qt, . - -qt- ( ...), 2 3 GUI, ( ).
, 1 QApplication. ( )
, - QApplication.exec().
QThread QApplication exec run().
. . QApplication... - . ( Qapplication ... QWidget GUI... ...)
And for your question, here is the answer. If you want to create only one plugin, you can use QMetaObject :: invokeMethod this code sets pixmap to the label and updates gui.
QImage img;...
bool succ = QMetaObject::invokeMethod(mainWin, "DisplaySlot", Qt::QueuedConnection, Q_ARG(QImage, img));
and add a public slot: to your display window
void mainWinClass::DisplaySlot(QImage qim) {
(*(ui.label)).setPixmap(QPixmap::fromImage(qim));
(*(ui.label)).update();
}
Hope this helps.
If anyone knows the solution to my problem ... described above (several gui plugins with qt in the host application), write to me.
source
share