qt5.5

QT .pro file: How to change default include path for MAC frameworks

跟風遠走 提交于 2019-12-11 23:29:20
问题 My .pro file looks like this: QT += core gui widgets SOURCES += a.cpp HEADERS += a.h FORMS += a.ui #Locally compiled Qt framework. Qt/out/{QtCore.framework,QtNetwork.framework..} QMAKE_LFLAGS += -L./Qt/lib/ QMAKE_CXXFLAGS += -F./Qt/lib/ macx { QMAKE_MAC_SDK = macosx10.9 LIBS += -framework QtCore -framework QtNetwork -framework QtGui -framework QtWidgets } I want to use frameworks compiled locally, but QT5.5 automatically includes framework from QT5.5.0 install directory ... I see a.cpp

What is the correct way to “stop / shutdown” a QNetworkAccessManager?

独自空忆成欢 提交于 2019-12-11 14:15:10
问题 I have a QNetworkAccessManager . Let's assume I have a pending request: QNetworkRequest request(url); this->m_networkManager->get(request) Can I shutdown the QNetworkAccessManager at any time? I am asking because I see a write access violation when I destruct my object m_networkManager during a pending get request. Or how can I safely destroy the manager, there seems to be no stop or shutdown functionality. 回答1: The root cause is that our QNetworkAccessManager is used in a threaded worker (1)

Qt Windows Deployment: Application does not start

浪尽此生 提交于 2019-12-10 22:56:16
问题 I have written a c++ application using Qt 5.5.1 compiled with msvc-12.0. Now I want to deploy the Application and I'm using the Qt Windows Deployment tool (windeployqt.exe). Using windeployqt produces a whole bunch of dlls that my application requires and it also creates a platforms directory where it copies qwindows.dll . From another stack-overflow post I saw that qminimal.dll might also be required and I have manually copied it as well in the platforms directory. In addition to the dlls

How to enter a static methods for Qt Linguist QTranslator

佐手、 提交于 2019-12-08 10:50:27
问题 I have a Qt Linguist *.ts file like: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="de_DE" sourcelanguage="en_GB"> <context> <name></name> <message> <location filename="classWithStaticMethod.cpp" line="60"/> <source>File</source> <translation>Datei</translation> </message> </context> </TS> How do I enter a translation object with a static method. ClassWithStaticMethod.cpp has a static method where a QT_TR_NOOP("File") occurs at line 60 for instance. Leaving

How to change the titlebar color of a window in a Qt/Qml application?

给你一囗甜甜゛ 提交于 2019-12-06 06:29:02
I would like to change the colour of the (top) border and the titlebar of the window of my application in Qt 5.5, but can't find any solution. I know I can create a frameless windows (but then resizing doesn't work) and style my own window, I can also change the background colour of the window, but the border colour. I think there is probably since most apps in Windows 10 are able to do this. 来源: https://stackoverflow.com/questions/32251399/how-to-change-the-titlebar-color-of-a-window-in-a-qt-qml-application

Error: qt@5.5: unknown version :mountain_lion

不羁岁月 提交于 2019-12-03 08:17:29
问题 Followed this tutorial in installing qt5.5 on a macOS version 10.13.6 High Sierra. Failed when trying to brew install qt@5.5 giving me an error below: Error: qt@5.5: unknown version :mountain_lion Versions: brew Homebrew 2.0.0 Homebrew/homebrew-core (git revision 175af; last commit 2019-02-02) Homebrew/homebrew-cask (git revision 05a81; last commit 2019-02-02) macOS version 10.13.6 High Sierra any help? 回答1: Referring to the tutorial, the following steps are executed to install qt@5.5 brew

Error: qt@5.5: unknown version :mountain_lion

十年热恋 提交于 2019-12-03 01:11:55
Followed this tutorial in installing qt5.5 on a macOS version 10.13.6 High Sierra. Failed when trying to brew install qt@5.5 giving me an error below: Error: qt@5.5: unknown version :mountain_lion Versions: brew Homebrew 2.0.0 Homebrew/homebrew-core (git revision 175af; last commit 2019-02-02) Homebrew/homebrew-cask (git revision 05a81; last commit 2019-02-02) macOS version 10.13.6 High Sierra any help? houdinisparks Referring to the tutorial , the following steps are executed to install qt@5.5 brew update cd $( brew --prefix )/Homebrew/Library/Taps/homebrew/homebrew-core # below is the last

QSqlDatabase open always returns true after update

五迷三道 提交于 2019-12-02 10:22:13
问题 After updating Qt from 5.5 to 5.6 QSqlDatabase:open always returns true - even if the host is not reachable and/or username/password/database settings are set to nonsense. Test code: QSqlDatabase* db = new QSqlDatabase(QSqlDatabase::addDatabase("QMYSQL", "TESTCONNECTION")); db->setHostName(ip); db->setPort(port); db->setUserName(user); db->setPassword(pwd); db->setDatabaseName(dbName); db->setConnectOptions("MYSQL_OPT_CONNECT_TIMEOUT=4"); bool ok = db->open(); I compiled the Qt sql libs

QSqlDatabase open always returns true after update

人走茶凉 提交于 2019-12-02 04:41:46
After updating Qt from 5.5 to 5.6 QSqlDatabase:open always returns true - even if the host is not reachable and/or username/password/database settings are set to nonsense. Test code: QSqlDatabase* db = new QSqlDatabase(QSqlDatabase::addDatabase("QMYSQL", "TESTCONNECTION")); db->setHostName(ip); db->setPort(port); db->setUserName(user); db->setPassword(pwd); db->setDatabaseName(dbName); db->setConnectOptions("MYSQL_OPT_CONNECT_TIMEOUT=4"); bool ok = db->open(); I compiled the Qt sql libs against the latest mysql version (5.6.x). This was actually a reported bug: QSqlDatabase::open always

QT QWebEnginePage::setWebChannel() transport object

£可爱£侵袭症+ 提交于 2019-11-27 13:19:12
I'm using the QT WebEngine framework to display web pages. I'm injecting javascript into a page when it loads, and want to allow the javascript to be able to access a QT object. Apparently, to do this a QWebChannel must exist that establishes some IPC between chromium (the javascript) and the rest of my C++/QT project. I came across the QWebEnginePage::setWebChannel (QWebChannel *channel) function, however I can't find any examples of its use. The documentation ( http://doc.qt.io/qt-5/qwebenginepage.html#setWebChannel ) mentions that qt.webChannelTransport should be available in the javascript