QLabel kills our KMessageBoxes (and others)

David Faure faure at kde.org
Thu Oct 18 11:11:21 BST 2007


On Thursday 18 October 2007, Michael Pyne wrote:
> On Wednesday 17 October 2007, Albert Astals Cid wrote:
> > Hi, Qt has a bug that acording to qt-bugs@ can't be fixed in X11. That bug
> > causes the layout to not have a minimum size and you can resize the widgets
> > to almost 0x0 size. Examples attached.
> >
> > So what do we do? Ignore the problems? Can anyone from Qt really confirm
> > this is unfixable?
> 
> This bug has been around forever.  It's also present in JuK's delete dialog 
> for instance.
> 
> I believe it is caused by multiline rich-text QLabels.  So the solution 
> unfortunately seems to be either not to use them, wait for the trolls to 
> actually fix the bug, or if richtext is required, then to use multiple 
> single-line labels stacked as necessary.  Of course, that makes translation 
> hard to do. :(

Another workaround is a hardcoded setMinimumSize(). Hardcoded values suck,
but having a minimum size that is > 0x0 is already an improvement.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list