how to solve mqtt library problem
-
when i am adding library for Qt version 5.15.2 , its thrown an error :
qmqttconnection.cpp:169:39: error: ‘errorOccurred’ is not a member of ‘QAbstractSocket’
169 | connect(socket, &QAbstractSocket::errorOccurred, this, &QMqttConnection::transportError); -
I would double-check to make sure you are definitely using the Qt version that you think you are; the
errorOccurred()
signal was added in Qt version 5.15. https://doc.qt.io/qt-6/qabstractsocket.html#errorOccurred -
@rajel052 said in how to solve mqtt library problem:
i am using Qt verion 5.15.2
Are you really sure?
How did you verify what version you are using? -
@rajel052 said in how to solve mqtt library problem:
tools->kit->Qt-version ->5.15.2
But is this the Kit you are using?
I guess you have at least one other Kit with Qt 5.12.8 and that one is currently set for your project. -
Hi,
If you are building from the command line: always use the full path to the qmake executable from the Qt version you want to use. Otherwise you will get the one from your distribution. And no, changing any settings to point to a specific non distribution provided Qt is not a good idea because you will forget that you did that at some point and wonder why you don't have any qmake anymore when replacing the current version with a more recent one.
It's just a sane and good habit to use the full path, you know exactly what to expect doing that.