On 09/23/2010 05:35 PM, ext Thiago Macieira wrote:
A multi-window app is simply created by instantiating several windows
(MApplicationWindow w1; w1.show(); MApplicationWindow w2; w2.show()).
The app is however not able to determine the placement of the windows
relative to each other, that is up to the window manager. A device with
multiple outputs is also not likely map these into a single virtual
screen, the management of the windows would be complicated. Instead I
would expect the two outputs to be represented as different screens in
X. An app can be started on a specific screen with something like
"DISPLAY=:2 MyApp". Unfortunately, while for instance Gtk+ allows to
specify the X screen when creating a window in an app, Qt apparently
does not.
DISPLAY=:2 isn't a separate screen, it's a separate display. A separate screen
would be DISPLAY=:0.1 and that really depends on how the window manager does
it (Xinerama or not).
To specify which screen you want a widget to show in Qt, you simply pass the
screen as the parent:
QWidget *screen1 = QApplication::desktop()->screen(1);
QMainWindow myWIndow(screen1);
myWindow.show();
Thanks for the clarification, that is very convenient. I actually
glanced at QDesktopWidget and thought "it can't be that easy" :D
Regards,
Tomas
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev