best way to display custom note widgets in a list
-
Hey,
i'm working on a note app and have created my own note widget that i want to display in a list. since i'm very new to qt, i'm wondering what the best way is. i created a prototype in pyqt, but i used a scrollarea with a vertical layout and i don't think that's the right way.
now in qt creator with c++ i have tried to display the widgets in a qlistwidget, as itemwidgets, but i have problems with moving an edited note to the top of the list.
i have read about qlistview and qstyleditemdelegate but could not find out how to use them correctly.thanks in advance for any assistance 🦐
-
I would go for a QStyledItemDelegate on a QListView.
To be able to see the editors also when not editing what you probably want you need to also reimplement paint().
The Star Delegate example is a good example to start with.