Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26

Thread: Qt5 and embedwidgets

  1. #21
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt5 and embedwidgets

    Hi anda_skoa,
    I have added the following code in the container.

    Qt Code:
    1. void MainWindow::launch_app(int id)
    2. {
    3. qDebug()<<"In launch_app win id is "<< id;
    4. WId winid = (WId) id;
    5. display->setLayout(vl);
    6. window = createWindowContainer(QWindow::fromWinId(winid),display,Qt::WindowMinMaxButtonsHint|Qt::WindowCloseButtonHint|Qt::WindowCancelButtonHint);
    7. vl->addWidget(window);
    8. }
    9.  
    10. void MainWindow::Launch_Hello_Test()
    11. {
    12. qDebug() << "Launch_Hello_Test";
    13.  
    14. ApplicationProcess = new QProcess();
    15. QString executable(HELLOTEST);
    16. QStringList arguments;
    17. Container->process = ApplicationProcess;
    18.  
    19. connect( ApplicationProcess,SIGNAL(readyReadStandardError()),this,SLOT(readStandardError()));
    20. connect( ApplicationProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(readStandardOutput()));
    21. connect(ApplicationProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finish(int,QProcess::ExitStatus)));
    22.  
    23. ApplicationProcess->start(executable, arguments);
    24. }
    25.  
    26. void MainWindow :: readStandardOutput()
    27. {
    28. QString Output;
    29.  
    30. if(ApplicationProcess){
    31. Output = ApplicationProcess->readAllStandardOutput();
    32. qDebug()<<Output;
    33. }else{
    34. qDebug()<<"Problem StdOut";
    35. }
    36. }
    37.  
    38. void MainWindow :: readStandardError()
    39. {
    40. QString Output;
    41. if(ApplicationProcess){
    42. Output = ApplicationProcess->readAllStandardError();
    43. qDebug()<<Output;
    44. }else{
    45. qDebug()<<"Problem StdErr";
    46. }
    47. }
    To copy to clipboard, switch view to plain text mode 

    after launching the rasterwindow appliction conatiner is detecting only finished signal from rasterwindow, but the logs are not getting redirected.

    I could see 1 ,2 times the window embedding in container, but its not stable and proper and not always.
    embedding is happening in old code also one with thread and message queue


    Added after 17 minutes:


    is there any other way to embed an application using createWindowContainer or other way in Qt5 ?
    I am actually spending a lot of time on this and there are no much examples are references.
    Last edited by PstdEr; 19th June 2013 at 09:26.

  2. #22
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt5 and embedwidgets

    I modified the code a bit... with QQuickView.
    Qt Code:
    1. #include<QtQuick/QQuickView>
    2.  
    3. void MainWindow::launch_app(int id)
    4. {
    5. WId winid = (WId) id;
    6. QQuickView *view = new QQuickView();//QWindow::fromWinId(winid)) ;
    7. qDebug()<<"In launch_app win id is "<< id;
    8.  
    9. display->setLayout(vl);
    10. qDebug()<<"display->setLayout(vl);";
    11. //QWindow *wind = QWindow::fromWinId(winid);
    12. //window = createWindowContainer(wind,display,Qt::WindowMinMaxButtonsHint|Qt::WindowCloseButtonHint|Qt::WindowCancelButtonHint);
    13. window = QWidget::createWindowContainer(view);
    14. qDebug()<<"createWindowContainer";
    15. window -> setFocusPolicy(Qt::TabFocus);
    16. qDebug()<<"setFocusPolicy";
    17. /*
    18.   window = createWindowContainer(QWindow::fromWinId(winid),display,\
    19.   Qt::WindowMinMaxButtonsHint|Qt::WindowCloseButtonHint
    20.   |Qt::WindowCancelButtonHint
    21.   |Qt::FramelessWindowHint);*/
    22. vl -> addWidget(window);
    23. qDebug()<<"addWidget";
    24. }
    To copy to clipboard, switch view to plain text mode 

    QQuickView *view = new QQuickView();//QWindow::fromWinId(winid)) ;
    QQuickView *view = new QQuickView(QWindow::fromWinId(winid)) ;

    i have checked with above two this time i am able to see the logs when i launch rasterwindow from container, but the problem is that the container is closed and only rasterwindow is displayed.

    following warning is getting genearated "Xlib: extension "GLX" missing on display ":4".".

  3. #23
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,068
    Thanks
    35
    Thanked 1,462 Times in 1,416 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt5 and embedwidgets

    maybe you could upload a buildable and runnable example?

    Cheers,
    _

  4. #24
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt5 and embedwidgets

    rasterwindow related code:

    main.cpp
    -----------
    Qt Code:
    1. #include "rasterwindow.h"
    2. #include<mqueue.h>
    3. #include <stdio.h>
    4. #include<qwindow.h>
    5. #include<qwindowdefs.h>
    6.  
    7. int main(int argc, char **argv)
    8. {
    9. struct mq_attr mqAttr;
    10. char buffer[512];
    11. mqd_t msgid;
    12. int ret_val;
    13. int winid_int;
    14. WId winid ;
    15. mqAttr.mq_maxmsg = 10;
    16. mqAttr.mq_msgsize = 512;
    17.  
    18. QGuiApplication app(argc, argv);
    19. qDebug()<<"in main";
    20. RasterWindow window;
    21.  
    22. winid = window.winId();
    23. qDebug()<<"window id is :"<< winid;
    24. winid_int = (int) winid;
    25. qDebug()<<"window id int :"<< winid;
    26.  
    27. msgid = mq_open("/embed6",O_RDWR);
    28. if(-1 == msgid){
    29. perror("mq_open");
    30. //return NULL;
    31. }else{
    32. qDebug()<<"mq_open success";
    33. }
    34.  
    35. sprintf(buffer,"%d",winid_int);
    36.  
    37. ret_val = mq_send(msgid,buffer,strlen(buffer)+1,1);
    38. if(-1 == ret_val)
    39. perror("mq_send");
    40. else {
    41. qDebug () << "window id sent is"<< buffer;
    42. mq_close(msgid);
    43. }
    44.  
    45. window.show();
    46. return app.exec();
    47. }
    To copy to clipboard, switch view to plain text mode 

    rasterwindow.cpp
    ---------------------
    Qt Code:
    1. #include "rasterwindow.h"
    2. #include<mqueue.h>
    3. #include <stdio.h>
    4. #include<qwindow.h>
    5. #include<qwindowdefs.h>
    6.  
    7. RasterWindow::RasterWindow(QWindow *parent)
    8. : QWindow(parent)
    9. , m_update_pending(false)
    10. {
    11. qDebug()<<"In RasterWindow";
    12. m_backingStore = new QBackingStore(this);
    13. create();
    14. setGeometry(100, 100, 300, 200);
    15. setMinimumWidth(800);
    16. setMinimumHeight(600);
    17. //setGeometry(0, 0, 0, 0);
    18. }
    19.  
    20. bool RasterWindow::event(QEvent *event)
    21. {
    22. if (event->type() == QEvent::UpdateRequest) {
    23. m_update_pending = false;
    24. renderNow();
    25. return true;
    26. }
    27. return QWindow::event(event);
    28. }
    29.  
    30. void RasterWindow::renderLater()
    31. {
    32. if (!m_update_pending) {
    33. m_update_pending = true;
    34. QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest));
    35. }
    36. }
    37.  
    38. void RasterWindow::resizeEvent(QResizeEvent *resizeEvent)
    39. {
    40. m_backingStore->resize(resizeEvent->size());
    41. if (isExposed())
    42. renderNow();
    43. }
    44.  
    45. void RasterWindow::exposeEvent(QExposeEvent *)
    46. {
    47. if (isExposed()) {
    48. renderNow();
    49. }
    50. }
    51.  
    52. void RasterWindow::renderNow()
    53. {
    54. if (!isExposed())
    55. return;
    56.  
    57. QRect rect(0, 0, width(), height());
    58. m_backingStore->beginPaint(rect);
    59.  
    60. QPaintDevice *device = m_backingStore->paintDevice();
    61. QPainter painter(device);
    62.  
    63. painter.fillRect(0, 0, width(), height(), Qt::white);
    64. render(&painter);
    65.  
    66. m_backingStore->endPaint();
    67. m_backingStore->flush(rect);
    68. }
    69.  
    70. void RasterWindow::render(QPainter *painter)
    71. {
    72. painter->drawText(QRectF(0, 0, width(), height()), Qt::AlignCenter, QStringLiteral("QWindow"));
    73. }
    To copy to clipboard, switch view to plain text mode 

    rasterwindow.h
    ------------------

    Qt Code:
    1. #ifndef RASTERWINDOW_H
    2. #define RASTERWINDOW_H
    3.  
    4. #include <QtGui>
    5.  
    6. class RasterWindow : public QWindow
    7. {
    8. Q_OBJECT
    9. public:
    10. explicit RasterWindow(QWindow *parent = 0);
    11.  
    12. virtual void render(QPainter *painter);
    13.  
    14. public slots:
    15. void renderLater();
    16. void renderNow();
    17.  
    18. protected:
    19. bool event(QEvent *event);
    20.  
    21. void resizeEvent(QResizeEvent *event);
    22. void exposeEvent(QExposeEvent *event);
    23.  
    24. private:
    25. QBackingStore *m_backingStore;
    26. bool m_update_pending;
    27. };
    28. #endif // RASTERWINDOW_H
    To copy to clipboard, switch view to plain text mode 


    following is the log when i run the application:

    Qt Code:
    1. QML debugging is enabled. Only use this in a safe environment.
    2. in Main
    3. MainWindow
    4. thread create success
    5. Init unable to unlink
    6. mq_open success
    7. Launch_Hello_Test
    8. "in main
    9. "
    10. "In RasterWindow
    11. "
    12. "window id is : 113246214
    13. window id int : 113246214
    14. "
    15. window id received is : 113246214
    16. embed_window
    17. "mq_open success
    18. window id sent is 113246214
    19. "
    20. unlink success
    21. In launch_app win id is 113246214
    22. addWidget
    23. Minimum Height is 608
    24. /home/Documents/5.1example/appr2/container-build-Qt5_1Alpha-Debug/container exited with code 0
    To copy to clipboard, switch view to plain text mode 


    Added after 11 minutes:


    main.cpp
    -----------
    Qt Code:
    1. #include "mainwindow.h"
    2. MainWindow *Container;
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication qapp(argc, argv);
    6. qDebug()<<"in Main";
    7. Container = new MainWindow();
    8. Container->show();
    9. return qapp.exec();
    10. }
    To copy to clipboard, switch view to plain text mode 

    mainwindow.cpp
    ----------------
    Qt Code:
    1. #include "mainwindow.h"
    2. #include <QWindow>
    3. #include <QObject>
    4.  
    5. #define HEIGHT 708
    6. #define FTP_HEIGHT 60
    7. #define WIDTH 196
    8. #include <pthread.h>
    9. #include <mqueue.h>
    10. #include <QtWidgets/qwidget.h>
    11. #include <qwindow.h>
    12. #include <qwindowdefs.h>
    13.  
    14. #define HELLOTEST "/home/Documents/5.1example/appr2/rasterwindow-build-Desktop-Release/rasterwindow"
    15.  
    16. void *wait_for_id(void * arg);
    17.  
    18. extern MainWindow *Container;
    19.  
    20. MainWindow::MainWindow(QWidget *parent)
    21. : QMainWindow(parent)
    22. {
    23. qDebug()<< "MainWindow";
    24. ApplicationProcess = NULL;
    25. QWidget* mainwindow = new QWidget();
    26.  
    27. getDisplayProperties(&max_width,&max_height);
    28. setWindowMinimumSizes(max_width - 300,HEIGHT - 100);
    29. setWindowMaximumSizes(max_width,max_height);
    30.  
    31. createActions();
    32. createMenus();
    33.  
    34. mainwindow->setMinimumSize(min_width,min_height);
    35. mainwindow->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
    36. mainwindow->setMaximumSize(max_width,max_height);
    37. setCentralWidget(mainwindow);
    38.  
    39. QPalette pl ;
    40. pl.setColor(pl.Background,Qt::white);
    41.  
    42. mainwindow->setAutoFillBackground(true);
    43. mainwindow->setPalette(pl);
    44.  
    45. vLayout = new QVBoxLayout();
    46. mainLayout = new QHBoxLayout();
    47. vWidget = new QWidget();
    48.  
    49. appwindow = new ApplicationWindow (min_width - WIDTH ,min_height - (FTP_HEIGHT + 105),max_width - WIDTH,max_height - (100 +FTP_HEIGHT ) );
    50. display = appwindow->createApplicationWindow();
    51.  
    52. vWidget->setLayout(vLayout);
    53.  
    54. vLayout->addWidget(display);
    55. vLayout->setSpacing(1);
    56. display->setPalette(QPalette(QColor(10,0,10,255)));
    57. display->setAutoFillBackground(true);
    58. mainLayout ->addWidget(vWidget);
    59. mainwindow ->setLayout(mainLayout);
    60. vLayout->setContentsMargins(0,0,0,0);
    61. display->setContentsMargins(0,0,0,0);
    62. mainwindow->setContentsMargins(0,0,0,0);
    63.  
    64. mainwindow->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
    65. display->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
    66.  
    67. pthread_t tid;
    68. if (-1 == pthread_create(&tid,NULL,wait_for_id,NULL)){
    69. perror("pthread_create");
    70. }else{
    71. qDebug()<<"thread create success";
    72. }
    73. }
    74.  
    75. void MainWindow::getDisplayProperties(int* width,int* height )
    76. {
    77. int x = 0,y = 0;
    78. QRect rec;
    79. rec = D.geometry();
    80. rec.getRect(&x,&y,width,height);
    81. }
    82.  
    83. void MainWindow::setWindowMinimumSizes(int min_width,int min_height)
    84. {
    85. this->min_width = min_width;
    86. this->min_height = min_height;
    87. qDebug()<<"Minimum Height is"<<min_height;
    88. }
    89.  
    90. void MainWindow::setWindowMaximumSizes(int max_width,int max_height)
    91. {
    92. this->max_width = max_width;
    93. this->max_height = max_height;
    94. }
    95.  
    96.  
    97. void MainWindow::createActions()
    98. {
    99.  
    100. HelloTestAct = new QAction(tr("&HelloTest"),this);
    101. connect(HelloTestAct,SIGNAL(triggered()),this,SLOT(Launch_Hello_Test()));
    102. connect(this,SIGNAL(send_winid(int)),this,SLOT(launch_app(int)));
    103. }
    104.  
    105.  
    106. void MainWindow::Launch_Hello_Test()
    107. {
    108. qDebug() << "Launch_Hello_Test";
    109.  
    110. ApplicationProcess = new QProcess();
    111. QString executable(HELLOTEST);
    112. QStringList arguments;
    113. Container->process = ApplicationProcess;
    114.  
    115. connect( ApplicationProcess,SIGNAL(readyReadStandardError()),this,SLOT(readStandardError()));
    116. connect( ApplicationProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(readStandardOutput()));
    117.  
    118. connect(ApplicationProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finish(int,QProcess::ExitStatus)));
    119.  
    120. ApplicationProcess->start(executable, arguments);
    121. }
    122.  
    123. void MainWindow :: readStandardOutput()
    124. {
    125. QString Output;
    126.  
    127. if(ApplicationProcess){
    128. Output = ApplicationProcess->readAllStandardOutput();
    129. qDebug()<<Output;
    130. }else{
    131. qDebug()<<"Problem StdOut";
    132. }
    133. }
    134.  
    135.  
    136. void MainWindow :: readStandardError()
    137. {
    138. QString Output;
    139. if(ApplicationProcess){
    140. Output = ApplicationProcess->readAllStandardError();
    141. qDebug()<<Output;
    142. }else{
    143. qDebug()<<"Problem StdErr";
    144. }
    145. }
    146.  
    147. void * wait_for_id( void *arg)
    148. {
    149. struct mq_attr mqAttr;
    150. char buffer[1024];
    151. mqd_t msgid;
    152. int ret_val;
    153. int winid;
    154. mqAttr.mq_maxmsg = 10;
    155. mqAttr.mq_msgsize = 512;
    156.  
    157. if(mq_unlink("/embed6")<0)
    158. qDebug()<<"Init unable to unlink";
    159. else
    160. qDebug()<<"Init unlink success";
    161.  
    162. msgid = mq_open("/embed6",O_RDWR|O_CREAT,0777,&mqAttr);
    163.  
    164. if(-1 == msgid){
    165. perror("mq_open");
    166. }else{
    167. qDebug()<< "mq_open success";
    168. ret_val = mq_receive(msgid,buffer,sizeof(buffer),NULL);
    169.  
    170. if(-1 == ret_val) {
    171. qDebug() << "mq_receive ret_val(Err) = "<< ret_val;
    172. }
    173. else {
    174. qDebug() << "window id received is :"<< buffer;
    175. mq_close(msgid);
    176. winid = atoi(buffer);
    177. Container->embed_window(winid);
    178.  
    179. if(mq_unlink("/embed6")<0)
    180. qDebug()<<"unable to unlink";
    181. else
    182. qDebug()<<"unlink success";
    183. }
    184. }
    185. }
    186.  
    187. void MainWindow ::embed_window(int id)
    188. {
    189. qDebug() << "embed_window";
    190.  
    191. emit send_winid(id);
    192.  
    193. }
    194.  
    195. void MainWindow::launch_app(int id)
    196. {
    197. WId winid = (WId) id;
    198. qDebug()<<"In launch_app win id is "<< id;
    199. display->setLayout(vl);
    200. window = createWindowContainer(QWindow::fromWinId(winid),display,\
    201. Qt::WindowMinMaxButtonsHint|Qt::WindowCloseButtonHint
    202. |Qt::WindowCancelButtonHint
    203. |Qt::FramelessWindowHint);
    204.  
    205. vl -> addWidget(window);
    206. qDebug()<<"addWidget";
    207. }
    208.  
    209. void MainWindow::finish(int,QProcess::ExitStatus)
    210. {
    211. qDebug()<<"finish";
    212. }
    213.  
    214. void MainWindow::createMenus()
    215. {
    216. fileMenu = menuBar()->addMenu(tr("&File"));
    217. fileMenu->addAction(HelloTestAct);
    218. }
    219.  
    220. MainWindow :: ~MainWindow()
    221. {
    222. }
    To copy to clipboard, switch view to plain text mode 

    applicationwindow.cpp
    ----------------------

    Qt Code:
    1. #include "applicationwindow.h"
    2.  
    3. #include <QtWidgets/qwidget.h>
    4.  
    5. ApplicationWindow::ApplicationWindow(QWidget *parent) :
    6. QWidget(parent)
    7. {
    8.  
    9. }
    10. ApplicationWindow::ApplicationWindow(int min_width,int min_height,int max_width,int max_height,QWidget* parent)
    11. :min_width(min_width),min_height(min_height),max_width(max_width),max_height(max_height),QWidget(parent)
    12. {
    13.  
    14. }
    15.  
    16. ApplicationWindow::~ApplicationWindow()
    17. {
    18.  
    19. }
    20.  
    21. QWidget* ApplicationWindow::createApplicationWindow()
    22. {
    23. window = new QWidget;
    24. window->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
    25. window->setMouseTracking(true);
    26. window->setMinimumSize(min_width,min_height);
    27. window->setMaximumSize(max_width,max_height);
    28. return window;
    29. }
    To copy to clipboard, switch view to plain text mode 

    mainwindow.h
    ---------------
    Qt Code:
    1. #ifndef MAINWINDOW_H
    2. #define MAINWINDOW_H
    3.  
    4. #include<QtWidgets/QMainWindow>
    5. #include <QtWidgets/QDialog>
    6. #include <QtGui>
    7. #include <QtWidgets/qwidget.h>
    8. #include <QProcess>
    9. #include <QString>
    10.  
    11. #include "applicationwindow.h"
    12.  
    13. class MainWindow : public QMainWindow
    14. {
    15. Q_OBJECT
    16.  
    17. public:
    18. MainWindow(QWidget *parent = 0);
    19. ~MainWindow();
    20. void embed_window(int id);
    21. QProcess *process;
    22. private:
    23.  
    24. QProcess* ApplicationProcess;
    25. int max_width;
    26. int max_height;
    27. int min_width;
    28. int min_height;
    29.  
    30. QMenu *fileMenu;
    31. QWidget* mainwindow;
    32.  
    33. ApplicationWindow* appwindow;
    34. QHBoxLayout* mainLayout;
    35. QVBoxLayout* vLayout;
    36. QWidget* vWidget;
    37. QWidget* display;
    38. QAction* HelloTestAct;
    39. QWidget* window;
    40.  
    41. private:
    42. void createActions();
    43. void createMenus();
    44. void getDisplayProperties(int* width,int* height);
    45. void setWindowMinimumSizes(int min_width,int min_height);
    46. void setWindowMaximumSizes(int min_width,int max_width);
    47. public slots:
    48. void Launch_Hello_Test();
    49. void finish(int,QProcess::ExitStatus);
    50. void launch_app(int id);
    51. void readStandardOutput();
    52. void readStandardError();
    53. signals:
    54. void send_winid(int id);
    55. };
    56.  
    57. #endif // MAINWINDOW_H
    To copy to clipboard, switch view to plain text mode 

    applicationwindow.h
    -------------------

    Qt Code:
    1. #ifndef APPLICATIONWINDOW_H
    2. #define APPLICATIONWINDOW_H
    3. #include <QtWidgets/QtWidgets>
    4.  
    5. class ApplicationWindow : public QWidget
    6. {
    7. Q_OBJECT
    8. public:
    9. explicit ApplicationWindow(QWidget *parent = 0);
    10. explicit ApplicationWindow(int min_width,int min_height,int max_width,int max_height,QWidget* parent=0);
    11. QWidget * createApplicationWindow();
    12. public:
    13. virtual ~ApplicationWindow();
    14. private:
    15. int max_width;
    16. int max_height;
    17. int min_width;
    18. int min_height;
    19. QWidget* window;
    20. signals:
    21.  
    22. public slots:
    23.  
    24. };
    25.  
    26. #endif
    27. // APPLICATIONWINDOW_H
    To copy to clipboard, switch view to plain text mode 
    Attached Images Attached Images
    Last edited by PstdEr; 20th June 2013 at 09:43.

  5. #25
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt5 and embedwidgets

    Hi anda_skoa,

    When i run this application some times the window is embedding into the container some time not.
    and also some times getting error:
    QXcbConnection: XCB error: 8 (BadMatch), sequence: 429, resource id: 134217734, major code: 1 (CreateWindow), minor code: 0
    QXcbConnection: XCB error: 3 (BadWindow), sequence: 432, resource id: 117440551, major code: 18 (ChangeProperty), minor code: 0
    I obersved the log the message , receive print is coming before send print, does it cause any problem.

  6. #26
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,068
    Thanks
    35
    Thanked 1,462 Times in 1,416 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt5 and embedwidgets

    One thing you can try is to write the window Id once the window has actually shown up, e.g. as a one-time reaction to the first ShowEvent.

    I am unsure whether the cross-thread signal/slot handling works with a pure native thread, so you could check if enforcing a Qt::QueuedConnection helps (5th argument to connect) or using a QThread for the secondary thread.

    While I currently don't have a Qt5.1 build around, if anyone else would want to test it they would need a buildable project, something they can run qmake and make on or open in QtCreator, e.g. attached as a ZIP

    Cheers,
    _

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.