[Qt-interest] Anyone Using the Qt/Motif Extension

Jake Colman colman at ppllc.com
Wed Sep 29 16:49:54 CEST 2010


For 

    rect = parentGeometry();

Did you mean 

    rect = nativeParentWidget()->geometry()




>>>>> "DB" == David Boosalis <david.boosalis at gmail.com> writes:

   DB> Could you not do something like this:

   DB> QRect rect= parentGeometry();
   DB> QRect dialogRect = myDialog->geometry();
   DB> int newX = rect.x() + (rect.width() - dialogRect.width())/2);
   DB> int newY = rect.y()  + (rect.height() - dialogRect.height())/2);
   myDialog-> move(newX,newY);
   myDialog-> show()

   DB> 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
   >> 
   DB> _______________________________________________
   DB> Qt-interest mailing list
   DB> Qt-interest at trolltech.com
   DB> http://lists.trolltech.com/mailman/listinfo/qt-interest

-- 
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




More information about the Qt-interest-old mailing list