[Qt-interest] Multiple X servers
Bradley T. Hughes
bradley.hughes at nokia.com
Tue Jan 27 07:10:51 CET 2009
andrew.m.goth at l-3com.com wrote:
> Bradley T. Hughes wrote:
>> andrew.m.goth at l-3com.com wrote:
>>> "Specifies the screen on which to place the new window. Any
>>> valid screen name may be used, even one associated with a different
>>> display. Defaults to the same screen as its parent."
>> This can be done by passing the return value of
>> QDesktopWidget::screen() as the parent to QWidget. For example, to
>> place a QMainWindow on screen 1 (instead of the default which is
>> usually screen 0), do this:
>>
>> QMainWindow *mainWindow = new QMainWindow(QDesktopWidget::screen(1));
>
> Does this require Xinerama?
No. If you're using Xinerama, then all you have to do is move() your window
to the screen that you want it to be on (see QDesktopWidget's
screenGeometry() function).
--
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway
More information about the Qt-interest-old
mailing list