qt5.1

fromWinHBITMAP is it avaialable in QT 5.1.1

拥有回忆 提交于 2020-01-15 01:26:27
问题 The documents state that the function isavailable however I get an error with the statement img = QPixmap::fromWinHBITMAP(hRetVal).toImage(); The error is error C3861: 'fromWinHBITMAP': identifier not found I tried including #include <QPixmap> However I am still getting that . Any suggestions ? 回答1: It was moved into the QtWin namespace. #include <QtWin> HBITMAP bitmap = ... QtWin::HBitmapFormat format = ... QPixmap pixmap = QtWin::fromHBITMAP(bitmap, format); http://doc.qt.io/qt-5/qtwin.html

fromWinHBITMAP is it avaialable in QT 5.1.1

若如初见. 提交于 2020-01-15 01:25:10
问题 The documents state that the function isavailable however I get an error with the statement img = QPixmap::fromWinHBITMAP(hRetVal).toImage(); The error is error C3861: 'fromWinHBITMAP': identifier not found I tried including #include <QPixmap> However I am still getting that . Any suggestions ? 回答1: It was moved into the QtWin namespace. #include <QtWin> HBITMAP bitmap = ... QtWin::HBitmapFormat format = ... QPixmap pixmap = QtWin::fromHBITMAP(bitmap, format); http://doc.qt.io/qt-5/qtwin.html

how to refresh QTableWidget cells, after changing back-ground color

天大地大妈咪最大 提交于 2020-01-02 18:52:22
问题 I have a matrix created by QTableWidget, I have multiple threads that changing the colors of the cells, I want to see the coloring changing immediately after setting the color. what I have now is that only after finishing all cells coloring I see the whole cells colors changed as once. I have a good delay between the coloring, so it's not that the threads are filling the cells so fast. every thread calls the function fillInCell(x,y,val,myThreadIdx); void ResultMatrix::fillInCell(int i, int j,

QML file include - or one monolithic file (structure QML code)?

≡放荡痞女 提交于 2019-12-23 12:15:49
问题 This is a QML newbie question. From the table view example I have code like this: Column { anchors.top: toolbar.bottom ..... TabView { id:frame ...... Tab { title: "XmlListModel" ... } Tab { ... As the qml file gets quite long, I wonder if I can have nested qml files Column { anchors.top: toolbar.bottom ..... TabView { id:frame ...... <include tab 1 qml file> <-- possible ????? ------- <include tab 2 qml file> If such an include is not possible, how does a QML programmer structure his code?

Qt Creator 2.8.1 + MSVC 2013 Express = No compiler can produce code for this Qt version

我与影子孤独终老i 提交于 2019-12-19 05:33:19
问题 This question was asked on this thread, but is was closed as "off topic", which is confusing to me. This not a question looking for an opinion. This is a legitimate issue with concrete details and no doubt has a concrete answer. I'm setting up a new windows 8.1 laptop. I've installed MSVC 2013 express (Windows Desktop version). And I've installed Qt 5.1.1. In Qt Creator when I go to Tools -> Options -> Build & Run -> Compilers and hover the mouse over the auto-detected compiler: "Microsoft

qt5.1.1 mysql ubuntu QMYSQL driver not loaded

[亡魂溺海] 提交于 2019-12-18 03:43:27
问题 I'm trying to access mysql using Qt5.1.1 but i am getting the error the error below. I also searched a lot on google but unable to fix it.Please suggest me a solution so that i am able to resolve this error. error: QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QSqlError(-1, “ driver not loaded”, “ driver not loaded”) code: #include <QCoreApplication> #include <QDebug> #include <QDir> #include <QtSql> #include <QSqlDriver> #include

How to Drag and Drop Custom Widgets?

China☆狼群 提交于 2019-12-12 15:44:40
问题 I have created my own custom widget and I want to support internal drag and drop for the widgets. I have added 4 of my custom widgets in a vertical box layout. Now i want to drag and drop the custom widgets internally. To be more clear, If i drag the last widget and drop it in the first position, then the first widget has to move to the second positon and the last widget (which is dragged) has to move to first position. (same like drag and drop of the items in the List view). Can anyone