jeremic
22nd August 2009, 01:49
Hello, I'm using a style sheet on my QListWidget to make it look nice I have a small problem though. When the style sheet is set and an item is selected the selection box (pointed in the picture by the red arrow) does no wrap around my icon! How can I make it go around the whole QListWidgetItem (including the icon) and not just the text.
This does not seem to happen when I turn off my style.
This is the only style I use in the whole program:
QListView::item {
border: 1px solid #d9d9d9;
border-top-color: transparent;
border-bottom-color: transparent;
}
QListView::item:selected:active {
background: qlineargradient(x1: 1, y1: 0, x2: 0, y2: 3, stop: 0 #cbdaf1, stop: 1 #bfcde4);
}
QListView::item:hover {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);
border: 1px solid #bfcde4;
}
Heres the image:
http://img17.imageshack.us/img17/1165/erroraol.png
Thanks for any help!
This does not seem to happen when I turn off my style.
This is the only style I use in the whole program:
QListView::item {
border: 1px solid #d9d9d9;
border-top-color: transparent;
border-bottom-color: transparent;
}
QListView::item:selected:active {
background: qlineargradient(x1: 1, y1: 0, x2: 0, y2: 3, stop: 0 #cbdaf1, stop: 1 #bfcde4);
}
QListView::item:hover {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);
border: 1px solid #bfcde4;
}
Heres the image:
http://img17.imageshack.us/img17/1165/erroraol.png
Thanks for any help!