Hi,
 
I'm trying to port a Qt4 application to Qt5. All works fine except two points:
- we've multiple X-screens configured (:0.0 ... :0.3) but Qt5 seems to have lost the ability to display something on another screen than the default
- embedding an application window into another application doesn't work correct - the embeded window gets resized with the master but as soon as I click somewhere in the master, the embedded window is hidden by the master.
The second problem can maybe worked around by merging the two applications into one (it's on my todo) but it's still a problem in qt then...
 
The first problem can be shown with a small testcase:
---------------------------------
int main(int argc, char** argv)
{
  QApplication app(argc, argv);
  QDesktopWidget *dw = app.desktop();
  QMainWindow *wm = new QMainWindow(dw->screen(1));
  wm->winId();  // not needed with Qt4
  wm->windowHandle()->setScreen(QGuiApplication::screens().at(1));  // not needed with Qt4
  wm->show();
  QFileDialog::getOpenFileName(wm);
  return app.exec();
}
---------------------------------
It looks like the parentwidget's screen is not respected when the child is created. The QMainWindow can be shown on screen 1 with the help of QWindow::setScreen() but all children of QMainWindow are displayed on the default screen instead the one where the parent lives.
I tried to dig into the sources to see what's going wrong but I'm lost somewhere between QWindow and the xcb plugin... :(
 
Anyone an idea where to look further or what could went wrong here?
 
Thx,
Christian Ehrlicher
 
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to