Qt-interest Archive, January 2007
Q3ListView
Message 1 in thread
I am porting a project to Qt4, and have a couple of list boxes with 2
columns in the old code. I can not find a good easy to use equivalent to
QlistView in Qt4. Whan I place QListView, QtableView or QTreeView on the
Dialog using the Designer, I can not add columns like I used to with
QListView in Qt3. Is this by design, or maybe a feature coming later? It
looks like these classes use QHeaderView to manage the column headings,
but that is not a straighforward class to use either. Where is the
addColumn method?? These are simple list boxes, they do not have any
kind of complex model/view behind them, i just want a simple list for
users to pick from.
Thanks for the help.
--
[ signature omitted ]
Message 2 in thread
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kenneth Beck schrieb:
> I am porting a project to Qt4, and have a couple of list boxes with 2
> columns in the old code. I can not find a good easy to use equivalent to
> QlistView in Qt4. Whan I place QListView, QtableView or QTreeView on the
> Dialog using the Designer, I can not add columns like I used to with
> QListView in Qt3. Is this by design, or maybe a feature coming later? It
> looks like these classes use QHeaderView to manage the column headings,
> but that is not a straighforward class to use either. Where is the
> addColumn method?? These are simple list boxes, they do not have any
> kind of complex model/view behind them, i just want a simple list for
> users to pick from.
Hi,
take a look at QListWidget and QListWidgetItem.
>
> Thanks for the help.
>
- --
Andreas 'ar' Richter
http://www.oszine.de - http://ar.oszine.de
GPG-KeyID: 0x7BA12DD9
Fingerprint: D2E9 202B F4F0 EB16 25DE 5FF7 0CF2 3C57 7BA1 2DD9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFr33tDPI8V3uhLdkRAkntAKDibMuTBoT7/VvseUShOfYNyyKhJACgvmnU
YR0lIneuDgrr8mucn4ZTODk=
=mxwu
-----END PGP SIGNATURE-----
--
[ signature omitted ]