[vlc-devel] commit: Workaround braindead QT implementation of ResizeToContents ( Marian Ďurkovič )

Marian Ďurkovič md at bts.sk
Tue Sep 22 08:02:07 CEST 2009

> The default QT behaviour is, that it won't display the horizontal 
> scrollbar, but simply cuts all texts at right window edge. There's no 
> wordwrap nor any other means to see the rest of the text (who designed 
> this ?! even wxwidgets did that right).
> So by setting column width to 20000 pixels, we just define that the 
> area for text is larger than current visible part in window. As a 
> consequence, texts are not being cut and horizontal scrollbar is being 
> displayed, allowing the user to read text behind the right window edge.

Just to give an idea how "efficient" is the QT4's ResizeToContents, here are
test results on the same EPG data with different QT4 methods:

1) default (text cut at right window edge)   7 msec
2) the "right" thing (ResizeToContents)     76 msec
3) my latest workaroud (columnwidth=20000)   7 msec

Results were obtained by putting 
   msg_Err (p_intf, "update %lld",  mdate());
at the beginning and at the end of InfoPanel::update() function.

   With kind regards,


More information about the vlc-devel mailing list