[PyKDE] QScintilla losing double clicks?

Michael Pyle mpyle at legato.com
Tue Oct 7 23:42:01 BST 2003


I recently upgraded to Qt 3.2.1 and PyQt 3.8.1 (using qscintilla 1.2) and
found that the editor in eric3 stopped responding to double and triple
clickingon Windows. A little investigation found this to be true of even a
toy qscintilla example. In the following code 'double click' never shows up
on the console, while 'mouse press' shows up twice for each double click.

 

I'm pretty sure I have all the right versions together and putting some
printfs into the Qt code showed that the double click window messages were
being handled. Additional printfs in the qscintilla code just never shows
the double click messages coming through and, as I said, the code below is
not working for me.

 

Any suggestions would be much appreciated.

 

Thanks.

 

--Michael Pyle

--Legato Systems, Inc.

 

 

 

 

import sys
from qt import QApplication, QEvent
from qtext import QextScintilla
 
 
# ***********************************************************************
# Editor
# ***********************************************************************
 
class Editor( QextScintilla ):
    def __init__( self ):
        QextScintilla.__init__( self )
        
    def eventFilter( self, obj, event ):
        if event.type() == QEvent.MouseButtonPress:
            print 'mouse press'
        elif event.type() == QEvent.MouseButtonDblClick:
            print 'double click'
        return QextScintilla.eventFilter( self, obj, event )
        
 
# ***********************************************************************
# main()
# ***********************************************************************
 
def main( args ):
    app = QApplication( args )
    win = Editor()
    app.setMainWidget( win )
 
    win.show()
    app.exec_loop()
 
 
if __name__ == "__main__":
    main( sys.argv[1:] )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031007/bf8e04fb/attachment.html


More information about the PyQt mailing list