Skip to content
Snippets Groups Projects
Commit 6df2abd9 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ListItemDelegate + comment on Qt bug

parent 3af0d8db
No related branches found
No related tags found
1 merge request!2387unify code for list views
...@@ -18,6 +18,13 @@ ...@@ -18,6 +18,13 @@
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
//! Styling for items in list. //! Styling for items in list.
//!
//! We need this not least because a long-standing bug in Qt prevents us from
//! using the style sheet to fine-tune the item layout.
//! Specifically, in a style sheet stance like QAbstractItemView::item,
//! the padding-left property is ignored unless there is also a border property.
//! However, as soon as there is a border, the style sheet takes control over colors
//! so that the BackgroundRole in the model's data() function is ignored.
class ListItemDelegate : public QStyledItemDelegate { class ListItemDelegate : public QStyledItemDelegate {
Q_OBJECT Q_OBJECT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment