QML: List all object members/properties in console
Straight javascript offers what you are looking for: JSON.stringify(anything) It works on QML items such as Rectangle, and it also works on most arbitrary objects! Converting an object to a string
Straight javascript offers what you are looking for: JSON.stringify(anything) It works on QML items such as Rectangle, and it also works on most arbitrary objects! Converting an object to a string
There’s no signal but if you want to know when your widget has lost focus, override and reimplement void QWidget::focusOutEvent(QFocusEvent* event) in your widget. It will be called whenever your widget has lost focus. To give focus to a widget, use QWidget::setFocus(Qt::FocusReason). To validate input in a QLineEdit or QComboBox you can subclass QValidator and … Read more
In Qt5 winEvent was replaced by nativeEvent: bool winEvent(MSG* pMsg, long* result) is now bool nativeEvent(const QByteArray & eventType, void * message, long *result) And in EcWin7::winEvent you have to cast void to MSG: bool EcWin7::winEvent(void * message, long * result) { MSG* msg = reinterpret_cast<MSG*>(message); if (msg->message == mTaskbarMessageId) { … I was able … Read more
UPDATE: Use windeployqt.exe! It works really well. http://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool The simplest way to use windeployqt is to add the bin directory of your Qt installation (e.g. ) to the PATH variable and then run: windeployqt <path-to-app-binary> UPDATE: Upon Further testing, windeployqt did not copy over all the MingW dlls for me. (Tested with Qt 5.4 on … Read more
The problem was that in Ubuntu 18.04+ you need to install also qttools5-dev in order to get /usr/lib/x86_64-linux-gnu/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake.
QWindow has been introduced in Qt 5.0 due to the gui / widgets split. QWidget now lives in its own library (QtWidgets); it was necessary to provide the abstraction of a “toplevel window” for non-widgets based applications, and thus QWindow was created — and lives in QtGui. There is an entire class of non-widgets based … Read more
Qt Quick 2 uses a scene graph for efficient rendering on the GPU. Unfortunately this makes it impossible to embed classic widgets into the scene. The old approach to embed such widgets with the help of QGraphicsProxyWidget works only with Qt Quick 1, because internally it uses a QGraphicsView for all the heavy lifting and … Read more
You need to set the size constraint of the layout holding all your widgets to “SetFixedSize”. Although the name doesn’t sound like it will work, it ensures that your layout will only use the space it needs. You will not have the problem like you do in your second screenshot. Example: mainLayout.setSizeConstraint(QLayout::SetFixedSize);
For other people’s reference, I solved the issue by editing my platform mkspec file: /users/nic/Qt/5.3/clang_64/mkspecs/qdevice.pri change the following line: !host_build:QMAKE_MAC_SDK = macosx10.8 to this: !host_build:QMAKE_MAC_SDK = macosx10.9 Be sure to clean your project and run qmake again. Nic.
I just downloaded a fresh Qt 5.5 (via online installer) for Windows and ran into this problem. I also had it occur in 5.4, for unknown reasons and don’t remember how I fixed it. But, this time I was able to fix it and I took note. Using the URL in the other answer only … Read more