Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
I want make custom List Item
ttti07 last edited by
I want make custom List Item look like this:
(text) (spin box) (text)
(It may have a scroll bar on the right side, too)
Actually, once I made it with Widget class but it's just a Widget rather than a List.
Also I've heard about MVC concept and some related classes (i.e. QAbstractListModel and ItemView, Deligate, etc.),
but it's somewhat difficult (and I'm not good at English) so I cannot understand it without some examples.
Is there any simple example code or VERY easy program source code implementing this kind of List Item?
alexander last edited by
ListItem for QML ListView?
DenisKormalev last edited by
I think examples/itemviews will help you. Something like spinboxdelegate or stardelegate
Morris last edited by
Well, forget QListView.
It's the last thing you want..
All you have to do is to create a new widget class. Then you create a layout class to layout the widgets in vertical or whatever you want.
You don't have to make the layout class inherit from the QLayout things. Just make your own. It should be really simple.
For example, you're making a twitter client. Then you can make a widget call EntryWidget. Then you create 100 of them. And use the layout class to position them.
Oh, I forget to say maybe you need a QScrollBar..