View Full Version : Listwidgetitem text is chpopped while updating widget
sudhansu
24th June 2010, 15:01
HI All,
I've a list widget, and i added a button to listwidget item. Button is uploading, but it is uploading above text. so text is not visible. herewith i've attached the code. please tell me how can i movethe buuton to end. Thank you all.
Vit Stepanek
24th June 2010, 15:37
It appears that the QListWidget::setItemWidget method does not provide any layout arrangement of the existing text with the added widget.
From the documentation:
This function should only be used to display static content in the place of a list widget item. If you want to display custom dynamic content or implement a custom editor widget, use QListView and subclass QItemDelegate instead.
However, I'd create a simple QWidget derived class which will contain (and arrange in the proper layout) the text (in some QLabel) and the button, and add this widget to the QListWidget.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.