qt5.6

Unresolved external symbols in qtmaind.lib

ぃ、小莉子 提交于 2019-12-11 00:49:24
问题 I am trying to upgrade my Qt-project settings from Visual Studio 2013 to 2015. It almost done but I get some errors with qtmaind.lib. 1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: unresolved external symbol imp__RoInitialize@4 referenced in function _WinMain@16 1>qtmaind.lib(qtmain_winrt.obj) : error LNK2019: unresolved external symbol __imp__RoGetActivationFactory@12 referenced in function "public: __thiscall AppContainer::AppContainer(void)" (??0AppContainer@@QAE@XZ) 1>qtmaind.lib(qtmain

Adjust ColumnLayout when a Repeater's delegate height changes

别等时光非礼了梦想. 提交于 2019-12-10 11:29:41
问题 I've set up a file called test1.qml with the following contents: import QtQuick 2.6 import QtQuick.Layouts 1.3 Rectangle { width: 800; height: 1000; ColumnLayout { anchors.centerIn: parent // Header goes here Repeater { model: 3 delegate: MyRectangle { width: 150 height: width color: "#44ff0000" } } // Footer goes here } } I've also setup a file called test2.qml defined as follows: import QtQuick 2.6 import QtQuick.Layouts 1.3 Rectangle { width: 800; height: 1000; ColumnLayout { anchors

Qt 5.6 Beta Visual Studio 2015

妖精的绣舞 提交于 2019-12-10 02:20:47
问题 I have installed this http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/qt-opensource-windows-x86-msvc2015-5.6.0-beta.exe.mirrorlist And tried it using this extension on VS https://visualstudiogallery.msdn.microsoft.com/c89ff880-8509-47a4-a262-e4fa07168408 The extension detects the Qt version (5.6) but will give this error This Qt version uses an unsupported makefile generator (used: MSVC.NETMSBUILD, supported: MSVC.NET, MSBUILD) Is there any workaround? 回答1: The problem seems to

Is there a shorter way to initialize a QByteArray?

ぃ、小莉子 提交于 2019-12-08 16:27:48
问题 In my program I work a lot with serial communication so QByteArray is used very often. I was wondering if there was a shorter way to initialize a QByteArray with specific bytes than: const char test_data[] = { static_cast<char>(0xB1), static_cast<char>(0xB2), 0x5, static_cast<char>(0xFF), static_cast<char>(0xEE), static_cast<char>(0xEE), static_cast<char>(0x0)}; // Note QByteArray should be able to hold 0 byte const QCanBusFrame frame = QCanBusFrame(0xA1, QByteArray(test_data)); The static

Installing Qt 5.6: Which components should I choose?

旧巷老猫 提交于 2019-12-07 04:58:45
问题 I'm planning to start learning Qt (I have no previous knowledge) so I've downloaded the latest stable web installer for Windows and Linux (I've got to machines), following the directions of the Windows's wizard I got to the "Select Components" step but I'm very confused about what is everything and what do I really need. As a newbie and with a very basic Knowledge of Qt my plan is to test my code on Windows and Linux for both Desktop Console Software and Desktop Graphics Interface Software,

Adjust ColumnLayout when a Repeater's delegate height changes

只谈情不闲聊 提交于 2019-12-06 06:16:34
I've set up a file called test1.qml with the following contents: import QtQuick 2.6 import QtQuick.Layouts 1.3 Rectangle { width: 800; height: 1000; ColumnLayout { anchors.centerIn: parent // Header goes here Repeater { model: 3 delegate: MyRectangle { width: 150 height: width color: "#44ff0000" } } // Footer goes here } } I've also setup a file called test2.qml defined as follows: import QtQuick 2.6 import QtQuick.Layouts 1.3 Rectangle { width: 800; height: 1000; ColumnLayout { anchors.centerIn: parent // Header goes here Repeater { model: 3 delegate: Column { MyRectangle { width: 150 height:

QWebEngineView crashes on load() or page() method

本秂侑毒 提交于 2019-12-05 13:25:40
I'm working on porting a Qt 5.5, QWebView project to Qt 5.6 (beta), QWebEngine. I've gone through the porting guide here . My code looks like this: .h file defines _view like so: QWebEngineView* _view; and the .cpp constructor (class inherits from QWidget) has: QVBoxLayout* vbox = new QVBoxLayout(this); _view = new QWebEngineView(this); connect(_view, SIGNAL(loadFinished(bool)), this, SLOT(loadPageFinished(bool))); QString webDir = getReportBasePath() + no_tr("/index.html#") + startingPage; // QWebEnginePage *page = _view->page(); // <-- CRASH!! _view->load( QUrl("file:///" + webDir ) ); // <-

Installing Qt 5.6: Which components should I choose?

假装没事ソ 提交于 2019-12-05 11:25:26
I'm planning to start learning Qt (I have no previous knowledge) so I've downloaded the latest stable web installer for Windows and Linux (I've got to machines), following the directions of the Windows's wizard I got to the "Select Components" step but I'm very confused about what is everything and what do I really need. As a newbie and with a very basic Knowledge of Qt my plan is to test my code on Windows and Linux for both Desktop Console Software and Desktop Graphics Interface Software, AFAIK I need to build my code with a cross-platform compiler like G++ which runs on Windows and Linux,

Qt 5.6 Beta Visual Studio 2015

為{幸葍}努か 提交于 2019-12-05 02:52:45
I have installed this http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/qt-opensource-windows-x86-msvc2015-5.6.0-beta.exe.mirrorlist And tried it using this extension on VS https://visualstudiogallery.msdn.microsoft.com/c89ff880-8509-47a4-a262-e4fa07168408 The extension detects the Qt version (5.6) but will give this error This Qt version uses an unsupported makefile generator (used: MSVC.NETMSBUILD, supported: MSVC.NET, MSBUILD) Is there any workaround? The problem seems to be a bug in the extension that concatenates the MAKEFILE_GENERATOR settings. You might try the following

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