Re: [PyQt] Pressing enter in QLineEdit clicks QPushButton?
Sibylle Koczian wrote: Hello, I've got a dialog with a QLineEdit and a QPushButton. The QLineEdit is connected to a method which takes its text and appends it to a QTextBrowser (that's taken from the first GUI example in the PyQt book by M. Summerfield). The "clicked()" signal of the QPushButton is connected to a method that just prints a message. The problem: this method, which should only be called by clicking the button, is called every time Enter is pressed in the QLineEdit. This happens even if the edit control isn't connected to any method. The button is next to the line edit in the form and in the tab order. With "setAutoDefault(false)" for this button and for the exit button which follows in tab order I can prevent this behavior, but that isn't really very comfortable. And it shouldn't be necessary, should it? All this on openSUSE with Python 2.6, PyQt 4.4.4. Thank you for help, Sibylle Can you supply a simple example that reproduces the behavior? Best regards, Mads ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] ANN: eric 4.3.4 released
Hi eric segfaults on Debian based systems because of python-qscintilla. Please install the eric_4.3.4-1 from Debian and it will require correct versions of other packages. Python-kde4 is broken after the upgrade to sip 4.8.1 and makes eric segfault. Please remove python-kde4. Regarding *Ubuntu. I don't use Ubuntu and I haven't got time to administrate both Debian and Ubuntu Is there someone willing to administrate the Ubuntu package? Regards Gudjon On Mon, Jun 22, 2009 at 3:51 AM, Gustavo A. Díaz wrote: > Hi, > > I wanted to ask, does Eric 4.3.4 and latest snapshot 4.4.4 works with > PyQt4.5? Cause i can't run it... it says Segmentation fault. > Using: Python 2.6.2 - PyQt 4.5.1 - QScintilla 2.4 - sip 4.8.1 - Kubuntu > Jaunty with Qt4.5. > > Cheers. > > > 2009/5/31 Detlev Offenbach > >> Hi, >> >> I just uploaded eric 4.3.4. It is a maintenance release fixing some bugs. >> It >> is available via the eric4 web site. >> >> http://eric-ide.python-projects.org/index.html >> >> Regards, >> Detlev >> -- >> Detlev Offenbach >> det...@die-offenbachs.de >> ___ >> PyQt mailing listPyQt@riverbankcomputing.com >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt >> > > > > -- > Gustavo A. Díaz > GDNet Projects > www.gdnet.com.ar > > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] ANN: eric 4.3.4 released
Nevermind, fixed deleting Eric configurations files in my home... 2009/6/21 Gustavo A. Díaz > Hi, > > I wanted to ask, does Eric 4.3.4 and latest snapshot 4.4.4 works with > PyQt4.5? Cause i can't run it... it says Segmentation fault. > Using: Python 2.6.2 - PyQt 4.5.1 - QScintilla 2.4 - sip 4.8.1 - Kubuntu > Jaunty with Qt4.5. > > Cheers. > > > 2009/5/31 Detlev Offenbach > > Hi, >> >> I just uploaded eric 4.3.4. It is a maintenance release fixing some bugs. >> It >> is available via the eric4 web site. >> >> http://eric-ide.python-projects.org/index.html >> >> Regards, >> Detlev >> -- >> Detlev Offenbach >> det...@die-offenbachs.de >> ___ >> PyQt mailing listPyQt@riverbankcomputing.com >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt >> > > > > -- > Gustavo A. Díaz > GDNet Projects > www.gdnet.com.ar > -- Gustavo A. Díaz GDNet Projects www.gdnet.com.ar ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] ANN: eric 4.3.4 released
Hi, I wanted to ask, does Eric 4.3.4 and latest snapshot 4.4.4 works with PyQt4.5? Cause i can't run it... it says Segmentation fault. Using: Python 2.6.2 - PyQt 4.5.1 - QScintilla 2.4 - sip 4.8.1 - Kubuntu Jaunty with Qt4.5. Cheers. 2009/5/31 Detlev Offenbach > Hi, > > I just uploaded eric 4.3.4. It is a maintenance release fixing some bugs. > It > is available via the eric4 web site. > > http://eric-ide.python-projects.org/index.html > > Regards, > Detlev > -- > Detlev Offenbach > det...@die-offenbachs.de > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > -- Gustavo A. Díaz GDNet Projects www.gdnet.com.ar ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] problem with mouseDoubleClickEvent on QTreeView 1
laurlaur wrote: Just for a better view Hi, I'm new in PyQt programing so please have mercy :) I want to display the directories content and to catch the event mouseDoubleClickEvent , but it seems that I have some problems chatching this event. Eventualy if someone have a better ideea how to do this I'm open to suggestions. Below is my code. import sys from PyQt4.QtCore import * from PyQt4.QtNetwork import * from PyQt4 import QtGui class miniframe(): def __init__(self, parent =None): self.tree = QtGui.QTreeView() self.model = QtGui.QDirModel() self.tree.setModel(self.model) self.tree.setGeometry(10,750,400,200) self.tree.show() def mouseDoubleClickEvent(self, event): print "event" if __name__ =="__main__": app = QtGui.QApplication(sys.argv) x =miniframe() x.show() sys.exit(app.exec_()) Make sure you inherit from the classes correctly. In your case, you should inherit from the QTreeView class and then overload the method mouseDoubleClickEvent(). This snippet below works. Best regards, Mads import sys from PyQt4 import QtGui class DirView(QtGui.QTreeView): def __init__(self, parent =None): QtGui.QTreeView.__init__(self, parent) self.model = QtGui.QDirModel() self.setModel(self.model) self.setGeometry(10,750,400,200) def mouseDoubleClickEvent(self, event): print "event" if __name__ =="__main__": app = QtGui.QApplication(sys.argv) view = DirView() view.show() sys.exit(app.exec_()) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] problem with mouseDoubleClickEvent on QTreeView 1
Just for a better view Hi, I'm new in PyQt programing so please have mercy :) I want to display the directories content and to catch the event mouseDoubleClickEvent , but it seems that I have some problems chatching this event. Eventualy if someone have a better ideea how to do this I'm open to suggestions. Below is my code. import sys from PyQt4.QtCore import * from PyQt4.QtNetwork import * from PyQt4 import QtGui class miniframe(): def __init__(self, parent =None): self.tree = QtGui.QTreeView() self.model = QtGui.QDirModel() self.tree.setModel(self.model) self.tree.setGeometry(10,750,400,200) self.tree.show() def mouseDoubleClickEvent(self, event): print "event" if __name__ =="__main__": app = QtGui.QApplication(sys.argv) x =miniframe() x.show() sys.exit(app.exec_()) -- View this message in context: http://www.nabble.com/problem-with-mouseDoubleClickEvent-on-QTreeView-1-tp24135153p24135153.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: connection between 2 widget
I'm tring to get a solution, i searced for similar code in the pyqt examples source code but i can't find nothig similar. is the question i proposed comprensible? i hope some one can help me, thanks a lot to All! regards, Massimo Il giorno 19/giu/09, alle ore 01:24, Massimo Di Stefano ha scritto: Hi All, i'm tring to connect 2 widget but i havo problems to know how to do it. i can reproduce my problem with an example : W-1 (spinbox + button) [ it is a main app, and has in the menu bar an action to open W-2] W-2 (line edit + button) i run W-1, pressing its button it increase the spinbox value, then pressing the action from the menu -> open W-2 W-2 , at its start, read value from W-1 -- pressing the W-2 button process W-1 value and print it . my problem : i need that everitime i change the W-1 value ... ... when i press button in W-2 it will process the W-1(changed value) i hope my explanation is clear. here a paste of 2 widget : http://www.geofemengineering.it/data/paste.txt i uploaded the file to reproduce this example on : http://www.geofemengineering.it/data/fg.zip please, thanks for any help! regards, Massimo. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] wchar_t type mapping
Diez B. Roggisch schrieb: Hi, I want to wrap a method with the following signature: virtual irr::gui::IGUIStaticText* addStaticText(const wchar_t* text, const irr::core::rect& rectangle, bool border=false, bool wordWrap=true, irr::gui::IGUIElement* parent=0, irr::s32 id=-1, bool fillBackground = false) = 0; All types are mapped or declared, and compilation succeeds. However, on calling the function, Python barks with Traceback (most recent call last): File "hello_world.py", line 64, in main() File "hello_world.py", line 45, in main True); TypeError: argument 1 of IGUIEnvironment.addStaticText() has an invalid type Ok, I found the problem - one needs to pass a unicode-object. While this makes sense to a certain degree, I think it would be good to enhance the mapping of wchar_t so that an attempt to convert bytestrings to unicode is done (as it is in other python APIs), potentially producing a UnicodeDecodeError of course. Would that be something worth considering? Diez ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt