Bug 499131

Summary: A QListWidget doesn't get a frame drawn unless there are other widgets in the same layout
Product: [Plasma] Breeze Reporter: Tobias Leupold <tl>
Component: QStyleAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: noahadvs, tl, uhhadd
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The QListWidget lacks it's frame using Breeze
The frame is displayed correctly using Fusion
CMakeLists.txt
main.cpp
MainWindow.cpp
MainWindow.h

Description Tobias Leupold 2025-01-25 13:38:47 UTC
I think this is a Plasma 6 or Qt6/KF6 regression. I don't remember seeing this in Qt5/KF5 times:

A QListWidget that is the only widget in a layout doesn't get a frame. However, a frame is drawn as soon as another widget is added to the same layout.

This doesn't happen when using the Fusion style, in this case, the QListWidget always has it's frame.

I'll both attach screenshots and a minimal example producing the mentioned behavior.
Comment 1 Tobias Leupold 2025-01-25 13:39:41 UTC
Created attachment 177665 [details]
The QListWidget lacks it's frame using Breeze
Comment 2 Tobias Leupold 2025-01-25 13:40:00 UTC
Created attachment 177666 [details]
The frame is displayed correctly using Fusion
Comment 3 Tobias Leupold 2025-01-25 13:40:58 UTC
Created attachment 177667 [details]
CMakeLists.txt
Comment 4 Tobias Leupold 2025-01-25 13:41:09 UTC
Created attachment 177668 [details]
main.cpp
Comment 5 Tobias Leupold 2025-01-25 13:41:19 UTC
Created attachment 177669 [details]
MainWindow.cpp
Comment 6 Tobias Leupold 2025-01-25 13:41:30 UTC
Created attachment 177670 [details]
MainWindow.h
Comment 7 Tobias Leupold 2025-01-27 19:59:08 UTC
Maybe this is related to or even caused by https://bugs.kde.org/show_bug.cgi?id=488195 ?