-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
bdw schrieb: | On Thu, 3 Feb 2005 17:02 Hans-Peter Jansen <[EMAIL PROTECTED]> wrote: | |>Hi, |> |>next problem: while substraction or addition of two QPoints should |>work, it won't, at least not with |>sip version: 4.1.1 |>Qt version: 3.2.1 |>PyQt version: 3.13 |> |>Any ideas? |> |>Cheers, |>Pete |> |>>#!/usr/bin/env python |> |># -*- coding: utf-8 -*- |> |>import sys |>from qt import * |> |>class eventTest(QPushButton): |> def __init__(self, *args): |> QPushButton.__init__(self, "Drag me!", *args) |> self.pressPos = None |> |> def mousePressEvent(self, e): |> self.pressPos = p = e.pos() | | | Hello Peter | | I think a copy of the QPoint needs to be cached here, otherwise the | mousemove handler will always be adding the same QPoint to itself. | | Replacing the line above with the following seems to work okay for me. | | self.pressPos = p = QPoint(e.pos()) |
Well, references. Sometimes they save your life without you noticing it, sometimes they stab you in the back when you least expect it.
greetings
Torsten "When Jim is funny, I can be philosophical" Marek - -- Torsten Marek <[EMAIL PROTECTED]> ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858 Keyserver: subkeys.pgp.net
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCAntnfMVFHqJEyFgRAjJrAJ43WtXysMQVT6an36QP/OGjhMXqwgCgkhZA nNNpxtpuVhg9GaEz3kc39sc= =Q1td -----END PGP SIGNATURE-----
_______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
