[Konsole-devel] Re: [Issue N23563] [PATCH] Qt adds extra space to layouts when it shouldn't.

qt-bugs at trolltech.com qt-bugs at trolltech.com
Thu Jun 5 13:44:15 UTC 2003


On Thursday, 05. Jun 2003 13:27 Waldo Bastian wrote:
> No, that is not enough. In QMainWindow you have d->topDock and
> d->bottomDock. These get inserted in d->tll in
> QMainWindow::setUpLayout(). After the QDockAreaLayout fix, these docks
> now return 0 as height because all the widgets in them are hidden.
> This then gets adjusted to 1 in QWidgetItem::heightForWidth( int w ).
> The only way to circumvent that is if QWidgetItem::isEmpty() returns
> true, and that can only be achieved by hiding QDockArea.
>
> So the problem seems to be that a widget that only contains hidden
> widgets still takes up space.

OK, now I understand. The problem is really that QWidget does not allow
zero-sized widgets. Even with your layout change, the widgets will
still be one pixel tall, so even if they do not take up space, they may
still obscure (a very small part of) the central widget.

This problem needs a  more general solution. We will make a proper fix
in the next major version of Qt.  In the meantime I recommend keeping
the workaround in qt-copy.

- Paul

--
Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway



More information about the konsole-devel mailing list