[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 09:49:22 UTC 2003


On Tuesday, 03. Jun 2003 14:11 Waldo Bastian wrote:
> Qt assigns space to empty layouts leading to extra pixels that are
> undesired.
>
> This problem becomes very clear with a QMainWindow in full-screen
> mode. Without any toolbar, statusbar or menubar the central widget
> should cover the full screen. However, topDock and bottomDock still
> get inserted in a QBoxLayout in that case and get space allocated,
> even though they have nothing to show. This makes that the central
> widget becomes 2 pixels less high than the screen.

Hi Waldo,

Thank you for the bug report. It is always a pleasure to get a bug
report with a patch. The diff for QDockAreaLayout is obviously correct.

However, I am not convinced that it is necessary to change
qabstractlayout.cpp. Note that Qt does not allow visible widgets to
have zero height or width. If the widget is hidden, isEmpty() will be
true, so the result will be 0 anyway. If this change makes a
difference, it is probably because of a bug somewhere else. From your
description, however, it seems like the QDockAreaLayout change is
enough to fix the problem.

For now, I have just applied the QDockAreaLayout part of the patch.
Please let me know if this is not sufficient to fix the problem.

Best regards,

- Paul

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



More information about the konsole-devel mailing list