Qt-interest Archive, April 2008
Drag and Drop for custom widgets
Message 1 in thread
Hi,
I am a new user of QT and wants to implement drag and drop for a list of
custom widgets. If the widget is text and icon only, I could have used
QListWidget. But as I am using custom widgets, is subclassing
QAbstractListModel and QListVIew the only way to go? Is there some example
code I can refer to.
I am using QT 4.3 on Windows.
Thanks,
Andy
Message 2 in thread
On Monday 14 April 2008 19:36:17 Andy Gynn wrote:
> Hi,
>
> I am a new user of QT and wants to implement drag and drop for a list of
> custom widgets. If the widget is text and icon only, I could have used
> QListWidget. But as I am using custom widgets, is subclassing
> QAbstractListModel and QListVIew the only way to go? Is there some example
> code I can refer to.
no need to. thats what delegates are for.
http://doc.trolltech.com/latest/model-view-programming.html
http://doc.trolltech.com/latest/qitemdelegate.html
they work with Q*Widget too.
>
> I am using QT 4.3 on Windows.
you're using Qt 4.3, and it's cross platform.
--
[ signature omitted ]