[Qt-interest] Re : Anyone Using the Qt/Motif Extension
BOUCARD Olivier
boucard_olivier at yahoo.fr
Wed Sep 29 16:24:27 CEST 2010
It should be preferable to use frameGeometry property instead of geometry to
correctly center a window on the screen.
________________________________
De : David Boosalis <david.boosalis at gmail.com>
À : Jake Colman <colman at ppllc.com>
Cc : qt-interest at trolltech.com
Envoyé le : Mer 29 septembre 2010, 16h 04min 53s
Objet : Re: [Qt-interest] Anyone Using the Qt/Motif Extension
Could you not do something like this:
QRect rect= parentGeometry();
QRect dialogRect = myDialog->geometry();
int newX = rect.x() + (rect.width() - dialogRect.width())/2);
int newY = rect.y() + (rect.height() - dialogRect.height())/2);
myDialog->move(newX,newY);
myDialog->show()
On Tue, Sep 28, 2010 at 7:34 PM, Jake Colman <colman at ppllc.com> wrote:
>My app is legacy Motif application that uses Qt for all of its new
>screens. As such, we make heavy use of the Qt/Motif extension. I am
>now in the process of porting from Qt 3.3.4 to Qt 4.7.0. Most of the
>app is running well and I am working out the kinks. A major kink for me
>is that dialog boxes are no longer centered over the dialog's parent
>window. Does anyone else have this issue or know what to do about it?
>
>--
>Jake Colman | Director, Software Development
>Principia Partners LLC
>101 West Elm Street | Conshohocken | PA 19428 | +1 (610) 755 9770
>t: +1 (610) 755 9786 | c: +1 (610) 348 2788 | f: +1 (201) 221 8929
>e: colman at ppllc.com | w: www.principiapartners.com
>Credit technology innovation awards winner 2008 and 2009
>
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at trolltech.com
>http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100929/e49e499d/attachment.html
More information about the Qt-interest-old
mailing list