Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.3
-
None
Description
When using a QComboBox of a fixed Width, you may want to use a HorizontalScrollBar in the QComboBox's listView to show its entire contents. HorizontalScrollBarPolicies: ScrollBarAlwaysOn and ScrollBarAsNeeded when set work incorrectly with QComboBox's popUp listView.
When a QComboBox with fixed width has items longer than the this width, the TextElideMode is set to Qt::ElideNone, and the HorizontalScrollBarPolicy is set to its default(Qt::ScrollBarAsNeeded) the following occurs:
The first time the QComboBox is clicked the space is allocated in the listViews rect for the HorizontalScrollBar, but no scrollbar shows up. The second time it is clicked it is no longer allocated. This is wrong behavior as the long text is truncated.
When using the same setup but changing the QHorizontalScrollBarPolicy to Qt::ScrollBarAlwaysOn, The HorizontalScrollBar shows up in the popUp listView, but doesn't scroll. The text is still truncated even with the scrollbar.
===============
With a listView or listWidget of a Fixed Width, the default HorizontalScrollBarPolicy works as it expected to work with the popUp listView of comboBox, that being if the text is too long to be displayed in the view, a Horizontal ScrollBar is displayed and the view is able to be scrolled.
Attachments
Issue Links
- resulted in
-
QTBUG-2035 Display of long text in QComboBox
-
- Closed
-