Hi friends,
I m going to implement aligment in listbox.but der is no direct method do this.so how can i do,please anyone share some idea.
thanks in advance
Thanks
sk
Hi friends,
I m going to implement aligment in listbox.but der is no direct method do this.so how can i do,please anyone share some idea.
thanks in advance
Thanks
sk
Which version of Qt do you use? Do you mean a QListBox from Qt 3 which is a QListView now or do you talk about QCheckBox?
For QListView/QListWidget see custom delegates in the documentation.
Thanks for reply.here i m using QT 4.so here m making listbox by implementing QAbstractListModel .Here there is no alignment method.should i follow any other approach to acheive.
Thanks
sk
If you use a listwidget, you have this option:
http://doc.qt.nokia.com/4.6/qlistwid...tTextAlignment
...and in a not item based model it is Qt::TextAlignmentRole.
Thanks for reply.let me go with ur suggestion.
its sovled now thanks.but the prob is for limited items its ok.if there is huge items then for every item ,have to set the properties like alignment in QListWidgetItem.its tedious process.i think ,i m missing sth.So for this case,what should be.
QListWidget is for small lists
If you have hundreds of thousands of items, use a list view.
Bookmarks