When I add a QWidget to a QListWidgetItem (via QListWidget setItemWidget) the QWidget is displayed high in the QListWidgetItem for some reason, with blank space below it. (See attached screen shot.)
This happens on both native Windows under Creator and on the Epoc emulator under Carbide.
Here is the style sheet for the QListWidget:
Also, the widget consists of three labels, the "Edit" is an image in one and the other two lines in two other labels. The two lines are in a QVBoxLayout and the image and QVBoxLayout are in a QHBoxLayout. Even though the top line has stretch=4 and the bottom line has stretch=2, the layout manager is sizing them the same, when I'd really like the top line to get more height.Code:#mScrollWindow { border-width: 8; border-image: url(:/images/FullLightBackground.png); } #mScrollWindow::item { border-bottom:1px solid rgb(205, 205, 205); padding: 0; } #mScrollWindow::item:selected { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #D0D0D0, stop: 0.4 #A8A8A8, stop:1 #909090); color: white; }
Any ideas?

Reply With Quote


