[PyQt] Strange bug in PyQt

Andreas Pakulat apaku at gmx.de
Sat Aug 9 19:57:01 BST 2008


On 09.08.08 14:09:17, Roberto Alsina wrote:
> On Saturday 09 August 2008 09:40:31 Andreas Pakulat wrote:
> > On 08.08.08 19:42:19, Roberto Alsina wrote:
> > > On Friday 08 August 2008 18:43:12 Andreas Pakulat wrote:
> > > > On 08.08.08 16:36:35, Roberto Alsina wrote:
> > > > > I don't know how to explain it, si I have to use pictures.
> > > >
> > > > Are you talking about the cut-off menu items? Or what? Which parts of
> > > > the pictures should we look into/
> > >
> > > Cutoff menu items, varying font sizes, the "Search" label, even the left
> > > qtreeview's header is weird.
> > >
> > > Loos like font metrics were all cray.
> >
> > Hmm, can you produce a small example that demonstrates the problem? Its
> > quite weird that loading an icon in a different way has such an effect.
> > I'm suspecting a bit that this might be an issue on your machine, so it
> > would be good to test it on other machines/different setups.
> 
> Attached is an example, and it got even weirder.
> 
> 1) It doesn't depend on actually using the QIcon, only on creating it before 
> there's a QApplication.

Thats a bug in your application, Qt doesn't support doing much - if
anything at all - with it until a QApp is created.

> 2) On windows you can't do that. (gives an error "Must construct a 
> QApplication before a QPaintDevice" which looks reasonable to me) [Qt 4.4.1]
>
> 3) On Arch Linux I get cutoff menus and small fonts on the QTreeView [4.4.1]

Indeed. I can confirm the problem, however it only appears with the
complete example. Just using a static QIcon before creating a QApp
doesn't produce it (i.e. just creating a mainwindow and adding a few
menus is not triggering the problem). So I can just guess its got
something to do with the icon + .ui file.

I also noticed that Qt and PyQt bail out if you use actual files in the
filesystem, as opposed to resources.

Andreas

-- 
Stay away from hurricanes for a while.


More information about the PyQt mailing list