Bug 446878 - Combobox not resizing to all of its content
Summary: Combobox not resizing to all of its content
Status: RESOLVED DUPLICATE of bug 403153
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.88.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-12 11:53 UTC by Alexander Stippich
Modified: 2021-12-14 18:40 UTC (History)
4 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 Alexander Stippich 2021-12-12 11:53:56 UTC
SUMMARY
The combobox is not resizing to fit the width to its content, unlike the qtwidgets counterpart.
The width is hardcoded to a minimum of 200, sometimes occupying way too much space.

Worse is that the combobox also resizes its width when a longer text entry is selected than the current one (and too long for a width of 200). This makes it impossible to correctly size the parent view for the combobox.
The width is not initially determined by all of the text entries in the model. Just the current selected text is used to determine the width, causing the change of width when selecting other entries.

Occurs for example within Skanpage (somehwat linked to Bug 445035)

STEPS TO REPRODUCE
1. Open Skanpage with the test backend
2. Change the source option from Flatbed to Automatic Document Feeder and back

OBSERVED RESULT
Combobox changes its width
most of the other options with a combobox have a width that is too large.

EXPECTED RESULT
Combobox is initially correctly sized to fit all of its content and does not enforce a minimum width 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2021-12-14 17:47:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/111
Comment 2 Nate Graham 2021-12-14 18:40:18 UTC

*** This bug has been marked as a duplicate of bug 403153 ***