[PyQt] Using same code for windows and linux ?

Andreas Pakulat apaku at gmx.de
Tue Feb 23 21:41:55 GMT 2010


On 24.02.10 02:24:43, Jebagnana Das wrote:
> Hello all,
> 
> I developed the GUI (using pyqt) in windows and used setGeometry to position
> the widgets.. When i tried to run the same code in linux it looks
> cluttered..
> 
> And added to that in windows the font size of 8 seems good.. But in linux
> especially in ubuntu it doesn't appear well since the font size is 10 by
> default.. One among the notable differences are the border of the group box
> doesn't appear in linux while it is visible in windows..
> 
> My question is,is there a way that i can make the same code to get the same
> look and feel in windows and linux irrespective of the font and size changes
> and other differences??

Sure, don't use manual layouting, instead leave the layouting to the Qt
layout classes. See http://qt.nokia.com/doc/4.6/layout.html for details.

Andreas

-- 
You will be awarded a medal for disregarding safety in saving someone.


More information about the PyQt mailing list