Hi!
I want to place one or more buttons into a QListWidgetItem to enable a choice at a certain position/item in the QListWidget.
It doesn't have to be a button, a simple text-link would be enough.
Is it possible?
So long
Hi!
I want to place one or more buttons into a QListWidgetItem to enable a choice at a certain position/item in the QListWidget.
It doesn't have to be a button, a simple text-link would be enough.
Is it possible?
So long
Why cant u use QListWidget::itemClicked ??
Also to give effect of link, you can change the mouse cursor if its in the ListWidget![]()
you can also use
but I agree with aamer4yuQt Code:
To copy to clipboard, switch view to plain text mode
From the docs -
void QListWidget::setItemWidget ( QListWidgetItem * item, QWidget * widget )
Also using a widget wont be a good idea when u can get the work done without it. Why make ur application heavySets the widget to be displayed in the give item.
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.![]()
Thanks for your answers.
I realized it with a context menu. But "setItemWidget" seems to be interesting.
Bye
Bookmarks