[Qt-interest] Different Selections buit same Model?
Sean Harmer
sean.harmer at maps-technology.com
Fri Jan 22 17:59:26 CET 2010
Hi,
On Friday 22 January 2010 16:54:14 Eric Clark wrote:
> Oh, then I guess that means that if I want to share the selections, that is
> when I need to do something, yes?
Yes create a QSelectionModel and set it on your views with:
void QAbstractItemView::setSelectionModel ( QItemSelectionModel *
selectionModel )
This allows you to share selection models across all of your views if you so
wish. Note that you are responsible for deleting it when no longer needed.
ATB,
Sean
>
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Scott Aron Bloom
> Sent: Friday, January 22, 2010 10:48 AM
> To: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] Different Selections buit same Model?
>
> The selection model is associated with the view.. There is nothing for you
> to do.
>
>
> Scott
>
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Eric Clark Sent:
> Friday, January 22, 2010 8:41 AM
> To: Qt Interest (qt-interest at trolltech.com)
> Subject: [Qt-interest] Different Selections buit same Model?
>
> Hello All,
>
> I know that I read in the documentation, at one point in time, that it is
> possible to have multiple views share the same model, but not the same
> selection model. Is this correct? I cannot seem to find where I read it in
> the documentation. If it is possible, could someone please tell me how to
> do it?
>
> Thanks,
> Eric
>
More information about the Qt-interest-old
mailing list