Author Topic: Double Click Event On A User Control  (Read 4410 times)

nilch

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
    • http://
Double Click Event On A User Control
« on: August 01, 2005, 04:24:22 pm »
This is for an App written in Python/PyQT...

I defined a double click event on a user created control (a cell of a QTable object).
But when I double click on it - it is sometimes responsive and brings up a sub-form on that event (as defined by a SLOT), sometimes it doesn't seem to react at all.

It seems very unpredictable. I have tried with slow taps, fast taps etc, but on the zaurus its just not predictable while on the desktop the same app behaves perfectly).

Any reasons for it, or any workarounds ???

Code snippets-----------------------------------------------

    def mouseDoubleClickEvent(self, ev):
        # --- dblClick event passes the currentIndex of widget dblclicked
        curr_Idx = (self.currIndex(),)
        self.emit(PYSIGNAL('dblClicked()'),curr_Idx)

and in the SIGNAL/SLOTS I defined
          self.cControl.connect(self.cControl,PYSIGNAL('dblClicked()'),self.doDblClickSelect)
     where self.DblClickSelect is a function to be called on double click.
New no more-C1000 / 5000D (sold my 6000 and 750) | Cacko ROM 1.23 on C1000 | 256 MB CF | 2GB PNY SD card | Socket Networker WiFi CF Card | USB Host cable from StreamlineCPUS | Mini Microphone (for voice recording) |