Hi I have QListWidget and I want to set QListWidgetItem in 2 columns. Can someone help me, how I set it? thanks
Printable View
Hi I have QListWidget and I want to set QListWidgetItem in 2 columns. Can someone help me, how I set it? thanks
don't get you right:
- if you mean that you want to add the same item twice see the documentation:- if you really want two columns you should use QTableWidget.Quote:
Warning: A QListWidgetItem can only be added to a QListWidget once. Adding the same QListWidgetItem multiple times to a QListWidget will result in undefined behavior.
QListWidget has only one column. why don't you use QTableWidget insted of QListWidget or use your own model with own view?
QTreeWidget can also have multiple columns. I prefer it over QTableWidget because there is less vertical space wasted between the entries.
I want to use QListWidget in two or more columns. why not use QTreeWidget or QTableWidget,because they have no IconMode. how should I do? my email : yunxiaodong@163.com