[Qt-interest] [Fwd: Re: Display list of arbitrary widgets ?]
Stephen Collyer
scollyer at netspinner.co.uk
Fri Dec 11 12:17:35 CET 2009
2009/12/11 Sean Harmer <sean.harmer at maps-technology.com>
>
> > Will I have to go the QListView/QItemDelegate route ? (which seem to
> > overcomplicate the whole requirement - I'll presumably have to screw
> around
> > with QModelIndex'es etc instead of the currentRowChanged() stuff ...)
> >
>
> I am not sure without trying it but I will leave that for you ;-)
>
> Fair enough. I'll write the code and see if it AllGoesHorriblyWrong(tm).
> Another possible approach would be to make a simple list-like widget based
> on
> QGraphicsView that embeds your widgets using QGraphicsProxyWidget, this
> should
> be relatively easy to do and avoids the headaches of the model view stuff.
> Just layout your widget-items into a QGraphicsLinearLayout add them to the
> scene and you are done. QGraphicsView will provide scrolling for you.
>
Hmm. Sounds too hard. And I won't get currentRowChanged() for free either.
I'm really looking for a "10 minutes of coding and it works" scenario, which
is all my trivial requirement should really need, I think. I want to put a
list of arbitrary widgets in a list, have them displayed, and be able to
detect when one is selected.
--
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091211/832cadad/attachment.html
More information about the Qt-interest-old
mailing list