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.
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.
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.
Bookmarks