qt5.7

Qt 5.7 QDockWidget default size

北慕城南 提交于 2020-01-17 12:38:25
问题 I am trying to have following setup: at start (when main window is opened) I want to have 2 QDockWidgets at left with width 400px and height 1/2 (each) of QMainWindows height. At the left, 3 QDockWidgets with width 400px and height 1/3 (each) of QMainWindows height. All of 5 widgets have to be resizable . That means using setFixSize() won't work in this case. So far I've tried changing Geometry>Width and Gemetry>Height in designed -> didn't work. Then I tried using resize() in main window

Qt 5.7 QDockWidget default size

限于喜欢 提交于 2020-01-17 12:37:28
问题 I am trying to have following setup: at start (when main window is opened) I want to have 2 QDockWidgets at left with width 400px and height 1/2 (each) of QMainWindows height. At the left, 3 QDockWidgets with width 400px and height 1/3 (each) of QMainWindows height. All of 5 widgets have to be resizable . That means using setFixSize() won't work in this case. So far I've tried changing Geometry>Width and Gemetry>Height in designed -> didn't work. Then I tried using resize() in main window

Add 32-bit versions of Qt 5.7 on a 64-bit machine

末鹿安然 提交于 2020-01-11 01:33:07
问题 Want to manually install 32-bit versions of Qt 5.7 so that I will be able to deploy my app to not only 32-bit but 64-bit machines as well. Initially when I installed it on my 64-bit Windows 7 machine , I only selected the 64-bit components and, hence, I can only select the MSVC2015_64 bit kits in Qt Creator to build my app with. Since I want to deploy my app to a 32-bit Windows 10 machine , I am trying to add the 32-bit Qt versions to my installation; tried through Tools > Options > Build &

QT5.7 How to deploy Qt Application on Linux

会有一股神秘感。 提交于 2019-12-25 12:44:44
问题 I'm trying to make a distributable linux Qt application. It will build run and install on the machine i've built it on AND on another machine (without Qt) that's the exact same version, but not others. I'm currently building on Ubuntu 16, but on 15 and 14 it will segfault (somewhere in libc.so.6). I use QtCreator to create a QtQuick Controls 2 application. It will automatically generate a sample with two clickable buttons. This is my test. As i understand it, there is no linuxdeployqt

How to change Qt 5.7 virtual keyboard layout/locale

那年仲夏 提交于 2019-12-14 03:45:37
问题 I'm writing a small windows application with Qt 5.7 using qml. For my project I would need to be able to change the virtual keyboard layout. But After hours of reading the docs and trying various things I'm still unable to achieve it. My Qt installation is default windows installation and it is up to date (just checked if there would be updates). As you can see here, the keyboard uses en_EN locale despite that my OS locale is fi_FI. And also notice that Language Change button is in disabled

Getting video frame in provided time Qt

你。 提交于 2019-12-13 16:34:42
问题 What I want to do is to get video frame at some time (for example at 20 sec). I know I could do something like this - rewind video and pause it: QMediaPlayer* player = new QMediaPlayer; ... player->play(); player->setPosition(20000); player->pause(); But is there some more elegant solution (this seems like a hack to me since I don't need whole video but only a frame at some time)? 回答1: Below steps may help you to capture a frame from a video file. Project level QT += multimedia Code level

Access QML StackView from a control

谁说我不能喝 提交于 2019-12-12 02:27:45
问题 Sorry for probably a stupid question - I'm very new to QML. One of my StackView's pages: Page { id : root header: ToolBar { BackButton { anchors.left: parent.left } } } BackButton code: Button { text: "<" font.pixelSize: 20 width: 30 onClicked: parent.root.StackView.view.pop() } I've tried parent.StackView also. No luck. Getting: TypeError: Cannot call method 'pop' of null Is there a solution? 回答1: I'd suggest something like this. main.qml: import QtQuick 2.6 import QtQuick.Controls 2.0

QML: Garbled text with colorful pixels around it on Intel GPU

笑着哭i 提交于 2019-12-11 08:17:03
问题 Screenshot of one of the Qt Creator example apps: My videocard is a Mobile Intel(R) 4 Series Express Chipset Family . Any idea what the problem might be? 回答1: The solution was to call either: QGuiApplication::setAttribute(Qt::AA_UseOpenGLES); or QGuiApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); before instantiating QGuiApplication . I don't know exactly why it worked :) 来源: https://stackoverflow.com/questions/39081028/qml-garbled-text-with-colorful-pixels-around-it-on-intel-gpu

QOpenGLWidget stops repainting on update()

谁说胖子不能爱 提交于 2019-12-07 20:04:00
问题 I have a custom QDialog which contains a hierarchy with 4 separate instances of QOpenGLWidget . Each of these QOpenGLWidget 's has its own GL context, and renders a different scene. I have a loop which calls update() (the recommended method for repainting them) on each QOpenGLWidget regularly (the focused one more regularly, however I think this is irrelevant to the problem). My problem is that eventually after random amounts of time (sometime it happens quickly, other times it won't happen