[Gambas-user] Re; Grid / Double Click
Benoit Minisini
gambas at ...1...
Sat May 5 11:20:33 CEST 2007
On samedi 5 mai 2007, Gareth Bult wrote:
> Well, so long as the event behaviour doesn't change for cells, it's not
> a problem.
> I do this;
>
> PRIVATE $doubleclick_pending AS Boolean;
>
> PUBLIC SUB grid_MouseDown()
> $doubleclick_pending = FALSE
> END
>
> PUBLIC SUB grid_DblClick()
> $doubleclick_pending = TRUE
> END
>
> PUBLIC SUB grid_MouseUp()
> IF $doubleclick_pending THEN activate_editor()
> $doubleclick_pending = FALSE ' because on a double click we get 2 x
> MouseUP's
> END
>
> (no "mouse" events if header is clicked, just the DblClick)
>
> :)
>
It seems logical that Qt sends two MouseUp event for one double click event.
--
Benoit Minisini
More information about the User
mailing list