What is the signal for when a widget loses focus?

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

Get HWND on windows with Qt5 (from WId)

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

Do I have to include all these Qt dlls with my application?

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

Qt5. Embed QWidget object in QML

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

Qt5 Target conditionals not found

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.

How to update component in Qt 5.2.1+?

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)