Re: [PyQt] PyQt bug with Qt 4.8.0?
On Wed, 28 Dec 2011 18:16:13 +0100, Linos wrote: > Hi, > after Qt upgrade to 4.8.0 in my machine i have been getting problems with > the > painting of vertical headers in QTableViews with a QSqlQueryModel that > refresh > on event (for example after tab change). > > I have created a testcase because i wanted to report the bug to Qt bug > tracker > but i can't reproduce it in c++ so i have created a testcase in python > with the > problem and the equivalent code in c++ that not reproduces the problem, > maybe i > am missing something but it seems like a but in PyQt? > > I am using now PyQt 4.9 but i had this problem with the previous PyQt > version as > well, i am using arch x86_64 and python2.7 > > Regards, > Miguel Angel. It's a PyQt bug triggered by a change in Qt v4.8.0. The fix is to remove the definition of doItemsLayout() from any .sip file they appear in (there are 4 in the QtGui module). Thanks, Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] [dip] underlying C/C++ object
hi, i've try to use with dip my own c++ qt widget. but in fact i've this error : "underlying C/C++ object has been deleted" my problem : i don't understand how dip execute the initialisation ( like QWidget.__init__(self,parent ) ) of qt componante it's in the configure function of the object_adapter ? with magic function pyqtConfigure ? try: obj.pyqtConfigure(**properties) except AttributeError: pass or i'm not on the right path thx for your help, i can clarify my answer if need it Kermit ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] [dip] underlying C/C++ object
On Wed, 4 Jan 2012 14:08:10 +0100, Kermit wrote: > hi, > > i've try to use with dip my own c++ qt widget. > but in fact i've this error : "underlying C/C++ object has been deleted" > > my problem : > > i don't understand how dip execute the initialisation ( like > QWidget.__init__(self,parent ) ) of qt componante > > > it's in the configure function of the object_adapter ? > with magic function pyqtConfigure ? > > try: > obj.pyqtConfigure(**properties) > except AttributeError: > pass > > > or i'm not on the right path ...not on the right path I suspect. I don't really understand the question. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Designer plugins with non-default QString/etc. SIP API versions
On Wed, 4 Jan 2012 01:52:08 +0100, Fabian Knittel wrote: > Hi, > > we're currently migrating our Python 2.x PyQt4 code from > QString/QVariant/... SIP API version 1 to version 2 in preparation for > Python 3. The app works fine and we're quite happy with API version 2. > > Unfortunately, our app specific Qt Designer plugins have stopped > working. The plugins use code from the app and therefore now depend on > API version 2, but the PyQt designer plugin loader loads > PyQt4.QtDesigner.QPyDesignerCustomWidgetPlugin before loading any of > our plugins and therefore the API version gets set to the default > (version 1). > > The attached patch lazy loads > PyQt4.QtDesigner.QPyDesignerCustomWidgetPlugin after the first > successful plugin module import. Assuming full control over all > plugins and further assuming that all plugins use the same API > versions, this allows the plugins to call sip.setapi before any > default APIs are set. > > Would something like this be acceptable upstream? > > Cheers > Fabian > > PS: The patch is against 4.7.3, but (as far as I can tell) 4.9 doesn't > appear to have changed much in designer/pluginloader.cpp Applied - thanks. I've also changed it so that plugins are loaded in alphabetical order so that you can control which is the first plugin and have a dummy plugin that just sets the API versions. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] How to extract the value of a Qspinbox?
I'm trying to extract the value of an QDoubleSpinBox but I can't understand why it does not work. It returns: levoltage = self.tension.value() AttributeError: 'ApplicationWindow' object has no attribute 'tension' Do you have any idea why? I'm just starting to learn PyQt :) My code: from visa import * from pylab import * import sys from PyQt4 import QtGui import numpy as np import random import ImageGrab from PyQt4 import QtCore, QtGui from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from PyQt4.QtGui import (QApplication, QLabel, QLineEdit, QSpinBox, QDoubleSpinBox, QVBoxLayout, QDial, QGridLayout, QComboBox, QPushButton) from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) class ApplicationWindow(QtGui.QMainWindow): """Example main window""" def __init__(self): global lechemin # initialization of Qt MainWindow widget QtGui.QMainWindow.__init__(self) # set window title self.setWindowTitle("QHE manip") # instantiate a widget, it will be the main one self.main_widget = QtGui.QWidget(self) # create a vertical box layout widget vbl = QtGui.QVBoxLayout(self.main_widget) # instantiate our Matplotlib canvas widget #=== #=== chemin = QLineEdit("C://testfab.jpg") #chemin.returnPressed.connect(self.sauvegarde) self.connect(chemin, SIGNAL("returnPressed()"), self.sauvegarde) #lechemin = unicode(chemin.text()) #=== tension = QDoubleSpinBox() tension.valueChanged.connect(self.voltage) tension.setRange(0,100) #=== vbl.addWidget(chemin) vbl.addWidget(tension) # set the focus on the main widget self.main_widget.setFocus() # set the central widget of MainWindow to main_widget self.setCentralWidget(self.main_widget) def sauvegarde(self) : global lechemin lechemin = unicode(self.chemin.text()) print lechemin def voltage(self) : global levoltage levoltage = self.tension.value() qApp = QtGui.QApplication(sys.argv) # instantiate the ApplicationWindow widget aw = ApplicationWindow() # show the widget aw.show() # start the Qt main loop execution, exiting from this script # with the same return code of Qt application sys.exit(qApp.exec_()) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] How to extract the value of a Qspinbox?
without the prefix 'self', tension is not an attribute of class, so it complaints this. you try replacing it with below : ... self.tension = QDoubleSpinBox() self.tension.valueChanged.connect(self.voltage) self.tension.setRange(0,100) ... From: Fabien Lafont To: pyqt@riverbankcomputing.com Sent: Wednesday, January 4, 2012 5:26 PM Subject: [PyQt] How to extract the value of a Qspinbox? I'm trying to extract the value of an QDoubleSpinBox but I can't understand why it does not work. It returns: levoltage = self.tension.value() AttributeError: 'ApplicationWindow' object has no attribute 'tension' Do you have any idea why? I'm just starting to learn PyQt :) My code: from visa import * from pylab import * import sys from PyQt4 import QtGui import numpy as np import random import ImageGrab from PyQt4 import QtCore, QtGui from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from PyQt4.QtGui import (QApplication, QLabel, QLineEdit, QSpinBox, QDoubleSpinBox, QVBoxLayout, QDial, QGridLayout, QComboBox, QPushButton) from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) class ApplicationWindow(QtGui.QMainWindow): """Example main window""" def __init__(self): global lechemin # initialization of Qt MainWindow widget QtGui.QMainWindow.__init__(self) # set window title self.setWindowTitle("QHE manip") # instantiate a widget, it will be the main one self.main_widget = QtGui.QWidget(self) # create a vertical box layout widget vbl = QtGui.QVBoxLayout(self.main_widget) # instantiate our Matplotlib canvas widget #=== #=== chemin = QLineEdit("C://testfab.jpg") # chemin.returnPressed.connect(self.sauvegarde) self.connect(chemin, SIGNAL("returnPressed()"), self.sauvegarde) # lechemin = unicode(chemin.text()) #=== tension = QDoubleSpinBox() tension.valueChanged.connect(self.voltage) tension.setRange(0,100) #=== vbl.addWidget(chemin) vbl.addWidget(tension) # set the focus on the main widget self.main_widget.setFocus() # set the central widget of MainWindow to main_widget self.setCentralWidget(self.main_widget) def sauvegarde(self) : global lechemin lechemin = unicode(self.chemin.text()) print lechemin def voltage(self) : global levoltage levoltage = self.tension.value() qApp = QtGui.QApplication(sys.argv) # instantiate the ApplicationWindow widget aw = ApplicationWindow() # show the widget aw.show() # start the Qt main loop execution, exiting from this script # with the same return code of Qt application sys.exit(qApp.exec_()) ___ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] How to extract the value of a Qspinbox?
Sorry, I should say it before but I've alreadt tryied this method: it returns: vbl.addWidget(tension) NameError: global name 'tension' is not defined 2012/1/4 Tayfun Kayhan : > without the prefix 'self', tension is not an attribute of class, so it > complaints this. you try replacing it with below : > > ... > self.tension = QDoubleSpinBox() > self.tension.valueChanged.connect(self.voltage) > self.tension.setRange(0,100) > ... > > From: Fabien Lafont > To: pyqt@riverbankcomputing.com > Sent: Wednesday, January 4, 2012 5:26 PM > Subject: [PyQt] How to extract the value of a Qspinbox? > > I'm trying to extract the value of an QDoubleSpinBox but I can't > understand why it does not work. It returns: > > levoltage = self.tension.value() > AttributeError: 'ApplicationWindow' object has no attribute 'tension' > > Do you have any idea why? I'm just starting to learn PyQt :) > > My code: > > > > > from visa import * > from pylab import * > import sys > from PyQt4 import QtGui > import numpy as np > import random > import ImageGrab > from PyQt4 import QtCore, QtGui > from matplotlib.figure import Figure > from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as > FigureCanvas > from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg > as NavigationToolbar > from PyQt4.QtGui import (QApplication, QLabel, QLineEdit, QSpinBox, > QDoubleSpinBox, > QVBoxLayout, QDial, QGridLayout, QComboBox, QPushButton) > from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) > > class ApplicationWindow(QtGui.QMainWindow): > """Example main window""" > def __init__(self): > global lechemin > # initialization of Qt MainWindow widget > QtGui.QMainWindow.__init__(self) > # set window title > self.setWindowTitle("QHE manip") > # instantiate a widget, it will be the main one > self.main_widget = QtGui.QWidget(self) > # create a vertical box layout widget > vbl = QtGui.QVBoxLayout(self.main_widget) > > # instantiate our Matplotlib canvas widget > > > #=== > > #=== > > chemin = QLineEdit("C://testfab.jpg") > # chemin.returnPressed.connect(self.sauvegarde) > self.connect(chemin, SIGNAL("returnPressed()"), > self.sauvegarde) > # lechemin = unicode(chemin.text()) > #=== > > tension = QDoubleSpinBox() > tension.valueChanged.connect(self.voltage) > tension.setRange(0,100) > > > #=== > > vbl.addWidget(chemin) > vbl.addWidget(tension) > > # set the focus on the main widget > self.main_widget.setFocus() > # set the central widget of MainWindow to main_widget > self.setCentralWidget(self.main_widget) > > def sauvegarde(self) : > global lechemin > lechemin = unicode(self.chemin.text()) > > print lechemin > > def voltage(self) : > global levoltage > levoltage = self.tension.value() > > qApp = QtGui.QApplication(sys.argv) > # instantiate the ApplicationWindow widget > aw = ApplicationWindow() > # show the widget > aw.show() > # start the Qt main loop execution, exiting from this script > # with the same return code of Qt application > sys.exit(qApp.exec_()) > ___ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Manipulate QML from Python
Hi, I have an application that introspects a a python class to generate an QML and a QObject wrapper. It works quite good but the QML handling is done in a very primitive way. Is there any QML reader/writer that can be used from python similar to json and xml? Thanks, H ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] How to extract the value of a Qspinbox?
what about vbl.addWidget(self.tension) ? From: Fabien Lafont To: Tayfun Kayhan Cc: "pyqt@riverbankcomputing.com" Sent: Wednesday, January 4, 2012 6:04 PM Subject: Re: [PyQt] How to extract the value of a Qspinbox? Sorry, I should say it before but I've alreadt tryied this method: it returns: vbl.addWidget(tension) NameError: global name 'tension' is not defined 2012/1/4 Tayfun Kayhan : > without the prefix 'self', tension is not an attribute of class, so it > complaints this. you try replacing it with below : > > ... > self.tension = QDoubleSpinBox() > self.tension.valueChanged.connect(self.voltage) > self.tension.setRange(0,100) > ... > > From: Fabien Lafont > To: pyqt@riverbankcomputing.com > Sent: Wednesday, January 4, 2012 5:26 PM > Subject: [PyQt] How to extract the value of a Qspinbox? > > I'm trying to extract the value of an QDoubleSpinBox but I can't > understand why it does not work. It returns: > > levoltage = self.tension.value() > AttributeError: 'ApplicationWindow' object has no attribute 'tension' > > Do you have any idea why? I'm just starting to learn PyQt :) > > My code: > > > > > from visa import * > from pylab import * > import sys > from PyQt4 import QtGui > import numpy as np > import random > import ImageGrab > from PyQt4 import QtCore, QtGui > from matplotlib.figure import Figure > from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as > FigureCanvas > from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg > as NavigationToolbar > from PyQt4.QtGui import (QApplication, QLabel, QLineEdit, QSpinBox, > QDoubleSpinBox, > QVBoxLayout, QDial, QGridLayout, QComboBox, QPushButton) > from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) > > class ApplicationWindow(QtGui.QMainWindow): > """Example main window""" > def __init__(self): > global lechemin > # initialization of Qt MainWindow widget > QtGui.QMainWindow.__init__(self) > # set window title > self.setWindowTitle("QHE manip") > # instantiate a widget, it will be the main one > self.main_widget = QtGui.QWidget(self) > # create a vertical box layout widget > vbl = QtGui.QVBoxLayout(self.main_widget) > > # instantiate our Matplotlib canvas widget > > > #=== > > #=== > > chemin = QLineEdit("C://testfab.jpg") > # chemin.returnPressed.connect(self.sauvegarde) > self.connect(chemin, SIGNAL("returnPressed()"), > self.sauvegarde) > # lechemin = unicode(chemin.text()) > #=== > > tension = QDoubleSpinBox() > tension.valueChanged.connect(self.voltage) > tension.setRange(0,100) > > > #=== > > vbl.addWidget(chemin) > vbl.addWidget(tension) > > # set the focus on the main widget > self.main_widget.setFocus() > # set the central widget of MainWindow to main_widget > self.setCentralWidget(self.main_widget) > > def sauvegarde(self) : > global lechemin > lechemin = unicode(self.chemin.text()) > > print lechemin > > def voltage(self) : > global levoltage > levoltage = self.tension.value() > > qApp = QtGui.QApplication(sys.argv) > # instantiate the ApplicationWindow widget > aw = ApplicationWindow() > # show the widget > aw.show() > # start the Qt main loop execution, exiting from this script > # with the same return code of Qt application > sys.exit(qApp.exec_()) > ___ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > >___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] How to extract the value of a Qspinbox?
I'm stupid... thank you very much! 2012/1/4 Tayfun Kayhan : > what about vbl.addWidget(self.tension) ? > > > From: Fabien Lafont > To: Tayfun Kayhan > Cc: "pyqt@riverbankcomputing.com" > Sent: Wednesday, January 4, 2012 6:04 PM > Subject: Re: [PyQt] How to extract the value of a Qspinbox? > > Sorry, I should say it before but I've alreadt tryied this method: > > it returns: > > vbl.addWidget(tension) > NameError: global name 'tension' is not defined > > > > 2012/1/4 Tayfun Kayhan : >> without the prefix 'self', tension is not an attribute of class, so it >> complaints this. you try replacing it with below : >> >> ... >> self.tension = QDoubleSpinBox() >> self.tension.valueChanged.connect(self.voltage) >> self.tension.setRange(0,100) >> ... >> >> From: Fabien Lafont >> To: pyqt@riverbankcomputing.com >> Sent: Wednesday, January 4, 2012 5:26 PM >> Subject: [PyQt] How to extract the value of a Qspinbox? >> >> I'm trying to extract the value of an QDoubleSpinBox but I can't >> understand why it does not work. It returns: >> >> levoltage = self.tension.value() >> AttributeError: 'ApplicationWindow' object has no attribute 'tension' >> >> Do you have any idea why? I'm just starting to learn PyQt :) >> >> My code: >> >> >> >> >> from visa import * >> from pylab import * >> import sys >> from PyQt4 import QtGui >> import numpy as np >> import random >> import ImageGrab >> from PyQt4 import QtCore, QtGui >> from matplotlib.figure import Figure >> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as >> FigureCanvas >> from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg >> as NavigationToolbar >> from PyQt4.QtGui import (QApplication, QLabel, QLineEdit, QSpinBox, >> QDoubleSpinBox, >> QVBoxLayout, QDial, QGridLayout, QComboBox, QPushButton) >> from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) >> >> class ApplicationWindow(QtGui.QMainWindow): >> """Example main window""" >> def __init__(self): >> global lechemin >> # initialization of Qt MainWindow widget >> QtGui.QMainWindow.__init__(self) >> # set window title >> self.setWindowTitle("QHE manip") >> # instantiate a widget, it will be the main one >> self.main_widget = QtGui.QWidget(self) >> # create a vertical box layout widget >> vbl = QtGui.QVBoxLayout(self.main_widget) >> >> # instantiate our Matplotlib canvas widget >> >> >> >> #=== >> >> >> #=== >> >> chemin = QLineEdit("C://testfab.jpg") >> # chemin.returnPressed.connect(self.sauvegarde) >> self.connect(chemin, SIGNAL("returnPressed()"), >> self.sauvegarde) >> # lechemin = unicode(chemin.text()) >> >> #=== >> >> tension = QDoubleSpinBox() >> tension.valueChanged.connect(self.voltage) >> tension.setRange(0,100) >> >> >> >> #=== >> >> vbl.addWidget(chemin) >> vbl.addWidget(tension) >> >> # set the focus on the main widget >> self.main_widget.setFocus() >> # set the central widget of MainWindow to main_widget >> self.setCentralWidget(self.main_widget) >> >> def sauvegarde(self) : >> global lechemin >> lechemin = unicode(self.chemin.text()) >> >> print lechemin >> >> def voltage(self) : >> global levoltage >> levoltage = self.tension.value() >> >> qApp = QtGui.QApplication(sys.argv) >> # instantiate the ApplicationWindow widget >> aw = ApplicationWindow() >> # show the widget >> aw.show() >> # start the Qt main loop execution, exiting from this script >> # with the same return code of Qt application >> sys.exit(qApp.exec_()) >> ___ >> PyQt mailing list PyQt@riverbankcomputing.com >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt >> >> > > ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] SCN_MODIFIED parameters
All, I'm trying to better understand the SCN_MODIFIED signal in QScintilla v2.6, since the documentation doesn't provide many details. Digging a bit in the source code: In Qt4\ScintillaQt.cpp(357), I see what I believe is a signal sent to Python as: emit qsb->SCN_MODIFIED(scn.position, scn.modificationType, text, scn.length, scn.linesAdded, scn.line, scn.foldLevelNow, scn.foldLevelPrev, scn.token, scn.annotationLinesAdded); Then, in Python\sip\qsciscintillabase4.sip(1219), the statement void SCN_MODIFIED(int, int, const char *, int, int, int, int, int, int, int); then exposes this signal as QsciScintillaBase.SCN_MODIFIED, correct? Thanks for any help! Bryan -- Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298 Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God. - 1 Tim. 6:14b-15 (The Message) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SCN_MODIFIED parameters
On Wed, 4 Jan 2012 11:26:03 -0600, "Bryan A. Jones" wrote: > All, > > I'm trying to better understand the SCN_MODIFIED signal in QScintilla v2.6, > since the documentation doesn't provide many details. Digging a bit in the > source code: > > In Qt4\ScintillaQt.cpp(357), I see what I believe is a signal sent to > Python as: > emit qsb->SCN_MODIFIED(scn.position, scn.modificationType, > text, > scn.length, scn.linesAdded, scn.line, scn.foldLevelNow, > scn.foldLevelPrev, scn.token, > scn.annotationLinesAdded); This is how the signal is emitted - nothing to do with Python. > Then, in Python\sip\qsciscintillabase4.sip(1219), the statement > void SCN_MODIFIED(int, int, const char *, int, int, int, int, int, int, > int); > then exposes this signal as QsciScintillaBase.SCN_MODIFIED, correct? This is just the description of the C++ signal to be wrapped. If you want information on the arguments then look at the Scintilla documentation. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Gesture programming in PyQt
Hello, does anybody have experience in gesture programming with PyQt? I am trying to program a custom gesture recognizer, but registering it with QGestureRecognizer.registerRecognizer(…) crashes the script. Here is the excerpt of the code that is executing the above function. --CODE-- class E5SwipeGestureRecognizer(QGestureRecognizer): __type = 0 __instance = None def __init__(self): super().__init__() @classmethod def gestureType(cls): if cls.__instance is None: cls.__instance = E5SwipeGestureRecognizer() cls.__type = QGestureRecognizer.registerRecognizer(cls.__instance) return cls.__type --END CODE-- Regards, Detlev Detlev Offenbach det...@die-offenbachs.de signature.asc Description: Message signed with OpenPGP using GPGMail ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Gesture programming in PyQt
On Wed, 4 Jan 2012 19:46:45 +0100, Detlev Offenbach wrote: > Hello, > > does anybody have experience in gesture programming with PyQt? I am trying > to program a custom gesture recognizer, but registering it with > QGestureRecognizer.registerRecognizer(…) crashes the script. Here is the > excerpt of the code that is executing the above function. > > --CODE-- > class E5SwipeGestureRecognizer(QGestureRecognizer): >__type = 0 >__instance = None > >def __init__(self): >super().__init__() > >@classmethod >def gestureType(cls): >if cls.__instance is None: >cls.__instance = E5SwipeGestureRecognizer() >cls.__type = >QGestureRecognizer.registerRecognizer(cls.__instance) >return cls.__type > --END CODE-- Hmm - the /Transfer/ annotation on QGestureRecognizer.create() looks wrong. Try changing it to /Factory/. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt