The following problem occurs with QT compilation:
error: ‘QStringLiteral’ was not declared in this scope resmodel->setHorizontalHeaderLabels(QStringList()<<QStringLiteral(Name)<<QStringLiteral(Size)); ^ QMetaObject::Connection connRet = QObject::connect(naManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))); error: ‘connRet’ was not declared in this scope Q_ASSERT(connRet); ^ /usr/include/qt4/QtCore/qglobal.h:1940:32: note: in definition of macro ‘Q_ASSERT’ define Q_ASSERT(cond) ((!(cond)) ?qt_assert(#cond,FILE,LINE) : qt_noop()) error: ‘class QComboBox’ has no member named ‘setCurrentText’; did you mean ‘setCurrentIndex’? CombBox->setCurrentText(curX);
There is a situation that is caused by using QT4 to compile code written in QT5 environment, some operating systems have both QT4, QT5, just switch to QT5 is fine
QT Creator “Tools” —- “Options” —- “build&run” – “Build Kit ( kit)”-“qt version” select QT5 on it
Read More:
- Debian9 g++ Compile Error: error: ‘EDOM’ was not declared in this scope
- cstdio [Error] ‘::fpos_t‘ has not been declared [How to Solve]
- C Language Compilation Error: variably modified ‘* *’ at file scope
- [Solved] Web server failed to start. Port 8080 was already in use.
- [Solved] ERROR: The kernel module failed to load, because it was not signed by a key that is trusted by the
- [Solved] vs Error: VS_error MSB4044, the required parameter ‘RemoteTarget’ of the task ‘ValidateValidArchitecture’ was not assigned a value
- [Solved] UnicodeEncodeError: ‘ascii‘ codec can‘t encode characters in position 3-9: ordinal not in range(128)
- [Solved] websocket: the client is not using the websocket protocol: ‘upgrade’ token not found in ‘Connection’ head
- [Solved] zookeeper Cluster error: Error: JAVA_HOME is not set and java could not be found in PATH.
- Push to origin/Master was rejected [How to Solve]
- The request was rejected because the URL contained a potentially malicious String “//“
- [Solved] gnutls_handshake() failed: The TLS connection was non-properly terminated
- [Solved] dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
- [Solved] Keepalived Configurate Error: Unicast peers are not supported in strict mode
- [Solved] Flask Error: RuntimeError: The session is unavailable because no secret key was set.
- [Solved] error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
- [Solved] websocket error in Linux service: / lib64 / libc. So. 6: version ` glibc_2.17‘ not found
- Error in Linux running file: bash: $’\r’: command not found
- [Solved] Git Error: OpenSSL SSL_read: Connection was reset, errno 10054和Failed to connect to github.com port 443
- Ionic Save to Gallery Plugin IOS Error: Method ‘requestAuthorization:’ not defined in Plugin ‘PhotoLibrary’ ERROR: Method ‘xxx’ not defined