[Qt-interest] changing style of a QListViewItem
Andre Somers
andre at familiesomers.nl
Wed May 26 11:59:19 CEST 2010
On 26-5-2010 11:43, Nishant Sharma wrote:
> Thanks Mandeep and Andre.
> I am "him" :)
> Seems, you people are talking in terms of QT 4.x , but unfortunately,
> I'm using 3.3.6. Can you give some suggestion for 3.3.6 ?
>
Update?
Really, Qt 3 is outdated. Don't use it for new software.
If you *must* use Qt 3, you're down to subclassing QListViewItem and
reimplementing it's paintCell method, if I remember correctly. I guess
you could add a method on your custom QListViewItem that you use to
toggle the flag that controls if it should be drawn in bold, and set
that from a slot connected to the QListView::doubleClicked() signal
after which you trigger an update.
In the future, if you have a question on such an outdated version of Qt,
please mention the version explictly. People on the list (rightfully)
expect questions to be about a relatively recent Qt version. Qt 3 does
not count as recent, Qt 4.5 might...
André
More information about the Qt-interest-old
mailing list