Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, April 2007
List Widget - Selection Rectangle.


Message 1 in thread

 Hi all,

Currently the selection  rectangle of the selectedItem is only around the
text in the ListWidget. Can I change the dimension of the selection
rectangle of a ListWidget??  That means selection should be the complete row
rather than selecting only the text in the listwidget.

thanks in advance,


-- 
 [ signature omitted ] 

Message 2 in thread

JitheshMenon schrieb:
> Hi all,
>  
> Currently the selection  rectangle of the selectedItem is only around
> the text in the ListWidget. Can I change the dimension of the selection
> rectangle of a ListWidget??  That means selection should be the complete
> row rather than selecting only the text in the listwidget.
>  
> thanks in advance,
> 
> 
> -- 
> regards
> Jits

Hi Jits,

try this:

ListWidget::setSelectionBehavior( QAbstractItemView::SelectRows );



btw: and please don't post twice ;)

-- 
 [ signature omitted ] 

Message 3 in thread

hi Michael,

thanks for suggestion,

its sorry to say that
ListWidget::setSelectionBehavior( QAbstractItemView::SelectRows );
wont make the whole item get selected.

Finally I replaced the List with a treewidget which supports a whole line
selection and makingit a single column and hiding the header. So it now
resembles a listwidget .

thanks,
Jithesh.


On 4/10/07, Michael Sprauer <Michael.Sprauer@xxxxxxxxxxxxxxxxxx> wrote:
>
> JitheshMenon schrieb:
> > Hi all,
> >
> > Currently the selection  rectangle of the selectedItem is only around
> > the text in the ListWidget. Can I change the dimension of the selection
> > rectangle of a ListWidget??  That means selection should be the complete
> > row rather than selecting only the text in the listwidget.
> >
> > thanks in advance,
> >
> >
> > --
> > regards
> > Jits
>
> Hi Jits,
>
> try this:
>
> ListWidget::setSelectionBehavior( QAbstractItemView::SelectRows );
>
>
>
> btw: and please don't post twice ;)
>
> --
> Mit freundlichen Grüßen/Kind regards
> Michael Sprauer
> ----------------------------------------------------------------
> THALES Defence Deutschland GmbH    Telefon: +49-7231-15-3714
> Land & Joint Systems               Telefax: +49-7231-15-3820
> Ostendstraße 3                     http://www.thales.de/
> D-75175 Pforzheim
> ----------------------------------------------------------------
> Sitz: Berlin /  AG Charlottenburg HRB 93875 B / GF: Klaus Rettig
> (Vors.), Herbert Gilbert, Eugen Klotz  /  Vors. AR: Alex Dorrian
> ----------------------------------------------------------------
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ]