[PyQt] mouse pressed event with qt 4.5
Andreas Pakulat
apaku at gmx.de
Tue Mar 17 19:28:22 GMT 2009
On 17.03.09 12:43:28, Thomas Espenhain wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> I have a strange behavior with the mouse pressed event with pyqt4 with
> qt-4.5
> Following situation:
> - - a stacked widget with 2 pages
> - - every page has a button placed at same position
> - - button1 on page 1 makes page 2 active
> - - button2 on page 2 makes something else
> And here is the problem:
> If I press button1, the second page gets active but also the button2
> pressed-method is executing right now!
> The buttons are inherited from qpushbutton. I overwrote the
> mousePressedEvent to find out whether the method is also called on
> button2 or not. In my suprise the methode is called one time only - from
> button1!
>
> The same behavior if pressed-method of button A deletes itself and makes
> another button visible at position of button A.
>
> With qt4.4 it works correct.
> Pyqt is version 4.4.4 in both cases
>
> Can someone confirm the behavior?
Where's the minimal executable example that reproduces this? A wild guess I
could make: The buttons are both childs of the stackwidget itself and not
the pages and are simply put at the right position via move() or some such
- instead of a layout. But of course thats just a guess without seeing the
actual code.
Andreas
--
The time is right to make new friends.
More information about the PyQt
mailing list