[Gambas-user] about listbox mode multi

Benoit Minisini gambas at ...1...
Mon Jul 24 22:21:43 CEST 2006


On Sunday 23 July 2006 15:15, Ron Onstenk wrote:
> On Sunday 23 July 2006 14:45, Benoit Minisini wrote:
> > Argh! There is an "optimization" in Qt that makes the ListBox signaling
> > changes in selection only when the mouse button is released (in Multi and
> > Extended modes). And the click event is of course signaled when the mouse
> > button is pressed. So your problem...
> >
> > I will try to find a workaround...
>
> Part of the qt listbox code is also used in Listview?
> I had with Listview and multi/extended mode also some
> problems that look to me the same as this.
>
> I could workaround with mousedown and mouseup events and
> setting a flag to signal the difference.
> I was suspecting my own quality :)
>
> Because the Columnview, Listview and Treeview are all
> based on same partial code in gambas and qt I'm afraid
> it count there to, the "optimization" from QT.
>
> Ron
>

I have changed the way Select events are delivered with ListBox and ListView. 
Now they are posted, i.e. delivered one event loop later.

The consequence is that now the behaviour is more logical. But it can't be 
perfect. Moreover, I can't have the same behaviour between ListBox and 
ListView.

Anyway, you should not rely on what the current item is during a Select event 
in Multi or Extended selection mode.

Moreover, in these modes, The Click event is raised for each selected element 
with the ListBox, but only for the first selected one with the ListView.

A last note: ListView, TreeView and ColumnView are based on the same QT 
widget, so all what I said applies to them too.

Regards,

-- 
Benoit Minisini




More information about the User mailing list