Center align the icon in QAbstractItemView using stylesheets
-
I have a custom model for a table view. My data function returns a QImage for the decoration role. But this image is not center aligned (horizontally and vertically). I tried using the following style sheet. But the image is still not centered. Please help.
QAbstractItemView::icon {
border: 1px solid black;
}QAbstractItemView {
subcontrol-position: center center;
} -
Try to use QAbstractItemView::item