Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to design the widget like this(1PassWord for PC);
-
I try to use QListWidget or QListView,but there's a problem. I don't know how to insert letter into the QListWidget(or QListView).At last ,i had to use twenty and seven(A-Z and digit) QListView...it looks a litte foolish...
Any good idea to this
-
Hi
Do you mean the A,B,C letters for sort of group caption?In any case you should use a delegate to draw it as you want.
https://doc.qt.io/qt-5/qstyleditemdelegate.htmlThis is similar
https://qt-articles.blogspot.com/2010/07/how-to-customize-listview-in-qt-using.html
-
@qazaq408
in QtWidgets there is directly no such feature. You could mimic it with a QTreeView and styled item delegate. The first level items are the sections and the second level items are the actual items in your list.The QML ListView supports such sections out of the box though.