[Qt-interest] Critical bug: QWidgets with size > 16383 break on OS X

Nikos Chantziaras realnc at arcor.de
Thu Jun 24 12:43:45 CEST 2010


On 06/24/2010 01:26 PM, Constantin Makshin wrote:
> To be honest, I'm not sure this bug is *that* serious. Screens are
> still much smaller than 8191 pixels in any dimension, even in
> multi-screen configurations AFAIK.

You don't understand.  A widget that is big has scrollbars.  If you 
visit a web page, the rendered document is much bigger than your screen. 
  It's like saying that web pages should never be bigger than your 
screen and to never use scroll bars.

As you can guess, a web page or any other document should be able to be 
higher than 16 thousand pixels.  It's a serious limitation otherwise, 
and hence why I consider this bug serious.


> Also this seems to be a platform
> limitation, not a Qt's one (else what's the reason to set
> QWIDGETSIZE_MAX value to something that's not supported?).

No, Qt's widgets are not platform widgets.  That was only with Qt3.  Qt4 
has internal widgets that are independent of platform widgets.

Qt4 promises to allow widgets of arbitrary sizes without any overhead. 
It was one of the advertised features when Qt4 came to replace Qt3.  And 
it doesn't work on OS X :-/


> As for your problem, the idea to put a "text display widget" into a
> QScrollView looks a bit strange. Why not use a read-only QTextEdit or
> QTextBrowser for that purpose?

Because those are not suitable for my application which needs 
pixel-exact positioning of text and images and also CLI-like prompt 
command line input at the bottom of the widget.


> On Thursday 24 June 2010 12:26:58 Nikos Chantziaras wrote:
>> On 06/13/2010 12:47 AM, Nikos Chantziaras wrote:
>>> I thought the maximum size of a QWidget in Qt4 was something like
>>> 2^24 (16 million-something) pixels on all platforms. But on OS X,
>>> this isn't the case. I have a widget inside a QScrollView, and
>>> that widget can grow very big in the Y (height) dimension (it's a
>>> text display where new text is added at the bottom all the time.)
>>> Heights over 40000 are not uncommon.
>>>
>>> However, on Mac OS X, I'm busted. When the widget grows over
>>> 16383 pixels in height, it wraps back to 8191, and my application
>>> gets very messed up. Note that QWIDGETSIZE_MAX is 16777215 on OS
>>> X too, so this shouldn't happen.
>>
>> I've opened a bug about this a while ago:
>>
>> http://bugreports.qt.nokia.com/browse/QTBUG-11415
>>
>> I'm surprised to see no one at least confirmed the bug, given the
>> seriousness of it. :-/




More information about the Qt-interest-old mailing list