Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.0
-
None
Description
It would be nice to have the possibility to center-align a checkbox in an itemview. Currently the checkbox is always drawn left no matter if there is additional text or decoration.
This feature is often asked in the forum. Herean example on how it would look like created with a test implementation:
The first row is with text (no behavior change), the other three without text and AlignHCenter/AlignLeft/AlignRight with the new behavior.
Here the old behavior:
The question is how to pass the alignment information to the view. Currently I'm misusing the TextAlignmentRole since the alignment of the checkbox / decoration only works when there is no text. Also adding two new alignments may conflict with e.g. QStyleOptionViewItem::decorationPosition then.
Attachments
Issue Links
- is duplicated by
-
QTBUG-93 QItemDelegate: Add a role for the alignment of an item decoration
- Closed
-
QTBUG-4650 Be able to specify the alignment of a checkbox inside an itemview
- Closed