Bug 436993 - QGroupBox with no title takes too much space
Summary: QGroupBox with no title takes too much space
Status: REPORTED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (other bugs)
Version First Reported In: 5.21.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-12 19:03 UTC by krzmbrzl
Modified: 2025-01-13 19:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krzmbrzl 2021-05-12 19:03:19 UTC
SUMMARY
When creating a QGroupBox in a Qt application running on KDE using the default style, the box will allocate space for the box's title even if there is none

STEPS TO REPRODUCE
1. Create QGroupBox without a title

EXPECTED RESULT
QGroupBox resizing to skip the space normally reserved for the title.


SOFTWARE/OS VERSIONS

Operating System: KDE neon 5.21
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-59-generic
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4770 CPU @ 3.40GHz
Memory: 15,6 GiB of RAM
Graphics Processor: GeForce GTX 660 Ti/PCIe/SSE2

ADDITIONAL INFORMATION
This is the same issue as was reported to Qt for their Fusion style: https://bugreports.qt.io/browse/QTBUG-86411
And this was the fix for it: https://codereview.qt-project.org/c/qt/qtbase/+/314739
I would assume that maybe the same patch could be applied to KDE's styles.

Note also that I am using the Breeze theme which is why I filed the issue against that. I don't know though if that is actually responsible for this.
Comment 1 Janet Blackquill 2022-02-23 19:35:32 UTC
Do you have an example application which uses this and is broken? FWIW, we've had the code to not do this since 2017, so it should be working as intended.
Comment 2 krzmbrzl 2022-02-24 07:10:58 UTC
The issue appeared in the development of the Mumble software. However, I worked around this issue by now.

From what I recall the issue really was as easy to reproduce as creating a QGroupBox without a title and then observing that actually it still allocates space for where the title usually goes.
Comment 3 Bug Janitor Service 2022-03-11 04:35:35 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!