Re: [PyQt] ANN: eric 4.3.4 released
Hi I only upload to Debian, not to Ubuntu. Please contact the Ubuntu uploader. /Gudjon On Thu, Jun 25, 2009 at 4:08 AM, Gustavo A. Díaz gustavo.d...@gmail.comwrote: I saw only packages for Ubuntu Karmic... 2009/6/22 Guðjón Guðjónsson gudjon.i.gudjons...@gmail.com 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 gustavo.d...@gmail.comwrote: 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 det...@die-offenbachs.de 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 -- Gustavo A. Díaz GDNet Projects www.gdnet.com.ar ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] python vs qt4 datatypes
On 24.06.09 22:20:31, Mario Daniel Carugno wrote: Hi there I'm starting with a pyqt development, a database application (what original). I can't decide which datatypes and sql library to use. I mean, is it better to use python datatypes (str, int, bool) or qt4 datatypes (qstring, ...) ? If i use python datatypes, using pyqt4-sql to access data seems to bring a lot of datatype convertions, thus in that case i could choose mysqldb, which uses python datatypes. Is that approach better than use all from PyQT ? I feel that python datatypes has more and better methods and functions, and that processing data in native types is always better. If you still use PyQt then for the GUI, you're again facing conversion of all your data. More importantly you won't be able to use the existing model/view classes to show your data, but you'll have to write a custom model yourself. Andreas -- Your nature demands love and your happiness depends on it. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] uic.loadUi() and custom widgets
A Dijous, 25 de juny de 2009, Greg Smith va escriure: I was curious if there was a way for a tool to have its Ui generated from a .ui file but still use custom widgets? I have a widget I wrote that inherits the QLineEdit widget in which I needed to modify the event() method so that a custom property will be modified if the backspace key was pressed I was able to get everything to work properly, in a simple dialog where I defined the layout within the __init__() method, however for more complex dialog windows I'd like to keep the ability to modify the layout within the designer and just swap out the which ever widget is supposed to be the custom one, that way the __init__() method remains tidy and less lines of code. Is there any straight forward ways to do this? Sure. In designer add a QLineEdit, right click on it and select Promote to In Promoted class name put the name of your class and in header class what you'd write in the import statement. For example if you have a class called MyLineEdit and it's in module MyWidgets you'd put: Promoted class name: MyWidgets Header file: MyWidgets Should MyWidgets __init__.py file not include MyLineEdit file then you'd do: Promoted class name: MyWidgets Header file: MyWidgets.MyLineEditFile Note that you can also write a plugin in python so your widgets are shown in Qt Designer the same way you'd do in C++. Take a look at [1] for more info. [1] http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#writing- qt-designer-plugins Greg -- Albert Cervera i Areny http://www.NaN-tic.com Mòbil: 669 40 40 18 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Deploying PyQt4 on Linux
Hello everybody, I'm trying to deploy an application (my_app) that uses Qt, Python, PyQt4 and SIP on Linux in a distribution independent way (meaning that even if there are other default versions of these libraries installed on the system, my_app will load at run time the symbols from the libraries I have built it against). My idea was to deploy all the necesarry dependencies in the /usr/local/my_app/lib folder. Therefore I have compiled Qt 4.5.1 and Python 2.6 with the --prefix=/usr/local/my_app option. After that I have built SIP and PyQt4 using Qt/Python versions previousely built. Finally I have compiled my application against all these libraries. At run time, PyQt4 still loads the default Qt 4.5.0 installed on the system (in /usr/lib), instead of the Qt 4.5.1 version from the /usr/local/my_app/lib folder. The only solution I have found is to modify the QTDIR environement variable, but I don't want to mess with that when I deploy my application. My question: is there a way to force PyQt4 to load the symbols from the Qt version it was built against? Thanks in advance for your help and best regards, Ion ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Using a QCompleter with a QLineEdit
projetmbc a écrit : Try to do the following change : OLD lineEditCompleter = QtGui.QCompleter(completerList) NEW lineEditCompleter = QtGui.QCompleter(completerList) END Sorry, I've forgot to do the changes. Here there are. OLD lineEditCompleter = QtGui.QCompleter(completerList) NEW lineEditCompleter = QtGui.QCompleter(completerList, self) END ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Deploying PyQt4 on Linux
Am Donnerstag, 25. Juni 2009 schrieb ion vasilief: Hello everybody, I'm trying to deploy an application (my_app) that uses Qt, Python, PyQt4 and SIP on Linux in a distribution independent way (meaning that even if there are other default versions of these libraries installed on the system, my_app will load at run time the symbols from the libraries I have built it against). My idea was to deploy all the necesarry dependencies in the /usr/local/my_app/lib folder. Therefore I have compiled Qt 4.5.1 and Python 2.6 with the --prefix=/usr/local/my_app option. After that I have built SIP and PyQt4 using Qt/Python versions previousely built. Finally I have compiled my application against all these libraries. At run time, PyQt4 still loads the default Qt 4.5.0 installed on the system (in /usr/lib), instead of the Qt 4.5.1 version from the /usr/local/my_app/lib folder. The only solution I have found is to modify the QTDIR environement variable, but I don't want to mess with that when I deploy my application. My question: is there a way to force PyQt4 to load the symbols from the Qt version it was built against? That's gonna be tough. You WILL have to fiddle with QTDIR and most probably with LD_LIBRARY_PATH, but just do it in a shell wrapper. You need to build on the oldest distribution, you're targeting, because glibc is backward but not forward compatible (huu, can't they predict the future..). You have to take care of dependant libs of ALL components, and need to test it on all targeted distributions. At the end, it may be easier to write an installer, that installs the necessary packages in a distribution coherent way. Good luck, Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QFileDialog exec bug?
Hi all, I suspect there's a bug in QFileDialog exec_ method. I created a QAction that, when triggered, shows a QFileDialog to open a file. In this filedialog: - if I select a filewith Open button or Enter Keyboard shortcut all works fine - *but* if i select a file *double-clicking on it* the QAction seems to *remain checked* (continuing to show eventual messages on QStatusBar) Where I'm wrong? Is there a bug? I have this problem only on Linux OS (versions: PyQt and Qt 4.5.1), while in Windows OS all works fine in every case (versions older than Linux ones: PyQt 4.4.3, Qt 4.4.1). I use *exec_* method to show the dialog If I try to use getOpenFileName static method all works on Linux too. As you noticed I use PyQt. Thanks ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Deploying PyQt4 on Linux
On 25.06.09 11:04:30, Hans-Peter Jansen wrote: Am Donnerstag, 25. Juni 2009 schrieb ion vasilief: Hello everybody, I'm trying to deploy an application (my_app) that uses Qt, Python, PyQt4 and SIP on Linux in a distribution independent way (meaning that even if there are other default versions of these libraries installed on the system, my_app will load at run time the symbols from the libraries I have built it against). My idea was to deploy all the necesarry dependencies in the /usr/local/my_app/lib folder. Therefore I have compiled Qt 4.5.1 and Python 2.6 with the --prefix=/usr/local/my_app option. After that I have built SIP and PyQt4 using Qt/Python versions previousely built. Finally I have compiled my application against all these libraries. At run time, PyQt4 still loads the default Qt 4.5.0 installed on the system (in /usr/lib), instead of the Qt 4.5.1 version from the /usr/local/my_app/lib folder. The only solution I have found is to modify the QTDIR environement variable, but I don't want to mess with that when I deploy my application. My question: is there a way to force PyQt4 to load the symbols from the Qt version it was built against? That's gonna be tough. You WILL have to fiddle with QTDIR and most probably with LD_LIBRARY_PATH, but just do it in a shell wrapper. No need for that, especially QTDIR is completely unknown to Qt4. That variable simply doesn't exist anymore. You can adjust LD_LIBRARY_PATH to poin to the Qt library, however you can also manage to do it without. Use the RPATH and RUNPATH stuff when linking PyQt to your Qt, you'll have to adjust the PyQt buildsystem for that I think and you probably want to make sure that you use relative paths so your app can be installed anywhere on the target system. You have to take care of dependant libs of ALL components, and need to test it on all targeted distributions. deps are not a big deal with Qt as it ships most of its deps itself and can also compile them in statically without having the libraries themselves being static libs. The only dep would be X11 and that should be a no-brainer usually. The other option would be building Qt as static libs and let PyQt use that, then you don't have to go through any of the hoops. Andreas -- You fill a much-needed gap. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Wed, 24 Jun 2009 12:54:37 -0500, Dave Peterson dpeter...@enthought.com wrote: Hello, Hello Dave. I'm trying to build PyQt 4.5.1 from source on Mac OSX 10.5 x86 and I'm running into a problem right from the start in that the qtdirs.app built during the configure step won't run because it won't load QtCore. I've done an otool -L on qtdirs.app/Contents/MacOS/qtdirs and it doesn't have any path prefix in front of the reference to QtCore. Mine does. Note that my Qt install is *not* a standard install. It is a custom build installed into /Users/dpeterson/py/qtbuild/install/Qt-4.5.1-1.egg/EGG-INFO/usr. I have verified I can run all the Qt apps, tools, and demos from this install. I have exported QTDIR set to this path prior to invoking PyQt's configure.py script. It looks like the build of the qtdirs.app is picking up all the right paths for this install. But it looks to me like PyQt's qtdirs.app assumes that the various Qt frameworks are in the system location, even though configure explicitly passed the right location for my frameworks via a -F flag to g++. Is this a bug with PyQt's qtdirs build process? Is your QTDIR/bin directory on your PATH? If you are compiling Qt yourself then it isn't installed in any standard system location anyway. I build it myself, but to the standard location which is /usr/local/Trolltech. I'll trying building Qt in a non-default directory to see if I can reproduce the problem. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
Hi Phil, Phil Thompson wrote: On Wed, 24 Jun 2009 12:54:37 -0500, Dave Peterson dpeter...@enthought.com wrote: I'm trying to build PyQt 4.5.1 from source on Mac OSX 10.5 x86 and I'm running into a problem right from the start in that the qtdirs.app built during the configure step won't run because it won't load QtCore. I've done an otool -L on qtdirs.app/Contents/MacOS/qtdirs and it doesn't have any path prefix in front of the reference to QtCore. Mine does. Right, when I do a build on another OS X box using the pre-built binary install of Qt 4.5.1, it also does. It has something like 'QtCore.framework/Versions/4/QtCore' (typing from memory as I'm not at that box right now). Note that my Qt install is *not* a standard install. It is a custom build installed into /Users/dpeterson/py/qtbuild/install/Qt-4.5.1-1.egg/EGG-INFO/usr. I have verified I can run all the Qt apps, tools, and demos from this install. I have exported QTDIR set to this path prior to invoking PyQt's configure.py script. It looks like the build of the qtdirs.app is picking up all the right paths for this install. But it looks to me like PyQt's qtdirs.app assumes that the various Qt frameworks are in the system location, even though configure explicitly passed the right location for my frameworks via a -F flag to g++. Is this a bug with PyQt's qtdirs build process? Is your QTDIR/bin directory on your PATH? Yup, it's the first entry in PATH. Forgot to mention that there is also a qt.conf in the .../EGG-INFO/usr/bin dir that just contains: [Paths] Prefix=/Users/dpeterson/py/qtbuild/install/Qt-4.5.1-1.egg/EGG-INFO/usr I'm new-ish to Qt but I believe that is right in that it points at the root of the install Qt dirtree? i.e. underneath that root dir are the bin, include, lib, mkspecs, plugins, etc. directories. Does that sound right or do I need to be explicit about the other possible path entries in the qt.conf? If you are compiling Qt yourself then it isn't installed in any standard system location anyway. I build it myself, but to the standard location which is /usr/local/Trolltech. I'll trying building Qt in a non-default directory to see if I can reproduce the problem. Thanks much! I'm tearing my hair out trying to find out why that macho header reference isn't what it should be. Some additional thoughts I've had: 1) Could the presence of a QtCore.la and/or QtCore.prl file in the .../EGG-INFO/usr/lib dir be causing this? I looked at the contents of those, and they seem right to me, but then again I'm not 100% sure what they should be. 2) I thought perhaps there might be an issue with the library actually inside the QtCore.framework but I've verified that .../EGG-INFO/usr/lib/QtCore.framework/Versions/4/QtCore exists, and is the same as .../EGG-INFO/usr/lib/QtCore.framework/QtCore. Do both of those need to be there? Thanks for any advice you can offer. -- Dave ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
RE: [PyQt] Using a QCompleter with a QLineEdit
Awesome! Merci beaucoup. That did the trick! Greg -Original Message- From: projetmbc [mailto:projet...@club-internet.fr] Sent: Thursday, June 25, 2009 3:56 AM To: projetmbc Cc: Greg Smith; PyQt Subject: Re: [PyQt] Using a QCompleter with a QLineEdit projetmbc a écrit : Try to do the following change : OLD lineEditCompleter = QtGui.QCompleter(completerList) NEW lineEditCompleter = QtGui.QCompleter(completerList) END Sorry, I've forgot to do the changes. Here there are. OLD lineEditCompleter = QtGui.QCompleter(completerList) NEW lineEditCompleter = QtGui.QCompleter(completerList, self) END ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] modifying a Qt Class: how to get the equivalent of macro Q_D in PyQt?
Hi everybody, I have subclassed QComboBox. For example I have changed paintEvent to get a customized look. It works perfectly. But I have also to change the behavior of the mouse wheel on the combo box. For this, I would like to subclass the function wheelEvent of QComboBox (see below its C++ source code, you can find it in the Qt source code in the directory src/gui/widgets/qcombobox.cpp). This function seems easy to understand and subclass, except for one thing: the macro Q_D creates a pointer d. How to do the same thing in PyQt? What is the PyQt equivalent of Q_D? Thanks a lot, Julien ## method wheelEvent of QComboBox void QComboBox::wheelEvent(QWheelEvent *e) { Q_D(QComboBox); if (!d-viewContainer()-isVisible()) { int newIndex = currentIndex(); if (e-delta() 0) { newIndex--; while ((newIndex = 0) (d-model-flags(d-model-index(newIndex,d-modelColumn,d-root)) Qt::ItemIsEnabled)) newIndex--; } else { newIndex++; while ((newIndex count()) (d-model-flags(d-model-index(newIndex,d-modelColumn,d-root)) Qt::ItemIsEnabled)) newIndex++; } if (newIndex = 0 newIndex count() newIndex != currentIndex()) { setCurrentIndex(newIndex); d-emitActivated(d-currentIndex); } e-accept(); } } -- python -c print ''.join([chr(154 - ord(c)) for c in '*9(9(18%.\ 91+,\'Z4(55l4(']) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong. (first law of AC Clarke) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] modifying a Qt Class: how to get the equivalent of macro Q_D in PyQt?
On 25.06.09 17:03:47, TP wrote: Hi everybody, I have subclassed QComboBox. For example I have changed paintEvent to get a customized look. It works perfectly. But I have also to change the behavior of the mouse wheel on the combo box. For this, I would like to subclass the function wheelEvent of QComboBox (see below its C++ source code, you can find it in the Qt source code in the directory src/gui/widgets/qcombobox.cpp). This function seems easy to understand and subclass, except for one thing: the macro Q_D creates a pointer d. How to do the same thing in PyQt? What is the PyQt equivalent of Q_D? You can't do that, you can't even use that inside a C++ subclass of QComboBox, because the dpointer is private to the QComboBox, so only friends of that class can use it. Long story short: If you want to do the same as the normal wheelEvent plus something additional then just call the original wheelEven from your subclass. Andreas -- You will be the victim of a bizarre joke. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Proeblems with pyuic4 utility in PyQt4.5.1
Hi Guys, I recently compiled in 2 computers, latest stable sip, as well PyQt4.5.1 and when i try to export the .ui file i get segfault: pyuic4 main.ui -o ../ui_main.py Fallo de segmentación (Segmentation Fault) dmesg says: python[31039]: segfault at 6ea01026 ip b7f3c5eb sp bfdb783c error 4 in libc-2.9.so[b7ec5000+15c000] Using Kubuntu Jaunty, compiled agaist python2.6.x, Qt4.5.x Cheers. -- 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
I didn't asked you to upload to Ubuntu i just mentioned that in Ubuntu distro is only available in Karmic. Thats all. Cheers. 2009/6/25 Guðjón Guðjónsson gudjon.i.gudjons...@gmail.com Hi I only upload to Debian, not to Ubuntu. Please contact the Ubuntu uploader. /Gudjon On Thu, Jun 25, 2009 at 4:08 AM, Gustavo A. Díaz gustavo.d...@gmail.comwrote: I saw only packages for Ubuntu Karmic... 2009/6/22 Guðjón Guðjónsson gudjon.i.gudjons...@gmail.com 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 gustavo.d...@gmail.com 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 det...@die-offenbachs.de 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 -- 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
[PyQt] python 2.5 - pyQt and Qt: what's the right version?
Today I've installed Qt 4.5.2 and I try to install pyQt 4.5.1 but I receive this error. I must to use python2.5 to run correctly the gis software (Qgis). $ cd PyQt-mac-gpl-4.5.1 $ python configure.py Determining the layout of your Qt installation... This is the GPL version of PyQt 4.5.1 (licensed under the GNU General Public License) for Python 2.5.4 on darwin. Error: This version of PyQt and the Desktop edition of Qt have incompatible licenses. What's the compatible version? Thanks a lot mando ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] setLayout for a QDockWidget
Hi, Try the small script below. I cannot manage to do setLayout for a QDockWidget: QDockWidget.setWidget() works correctly, but not QDockwidget.setLayout(), I obtain the following message: QWidget::setLayout: Attempting to set QLayout on QDockWidget , which already has a layout So, with some googling, I found: http://lists.trolltech.com/pipermail/qt-interest/2008-December/000524.html http://www.qtcentre.org/forum/f-newbie-4/t-changing-layout-21394.html It seems that there is a default layout inside a QDockWidget when it is created. How to delete this default layout in PyQt, and then set as new layout vboxlayout with the spin box in the following code? Thanks a lot, Julien from PyQt4.QtCore import * from PyQt4.QtGui import * import sys app = QApplication( sys.argv ) spin = QSpinBox() vboxlayout = QVBoxLayout( ) vboxlayout.addWidget( spin ) qmainwin = QMainWindow() qdock = QDockWidget( ) existing_layout = qdock.layout() print existing_layout # how to delete the existing layout?? qdock.setLayout( vboxlayout ) qmainwin.addDockWidget( Qt.TopDockWidgetArea, qdock ) qmainwin.show() app.exec_() -- python -c print ''.join([chr(154 - ord(c)) for c in '*9(9(18%.\ 91+,\'Z4(55l4(']) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong. (first law of AC Clarke) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] python 2.5 - pyQt and Qt: what's the right version?
On Thu, 25 Jun 2009 18:39:16 +0200, Luca Mandolesi mandol...@gmail.com wrote: Today I've installed Qt 4.5.2 and I try to install pyQt 4.5.1 but I receive this error. I must to use python2.5 to run correctly the gis software (Qgis). $ cd PyQt-mac-gpl-4.5.1 $ python configure.py Determining the layout of your Qt installation... This is the GPL version of PyQt 4.5.1 (licensed under the GNU General Public License) for Python 2.5.4 on darwin. Error: This version of PyQt and the Desktop edition of Qt have incompatible licenses. What's the compatible version? Qt v4.5.2 changes the name of the version which is causing a test to (wrongly) fail in configure.py. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Using a QCompleter with a QLineEdit
Greg Smith a écrit : Awesome! Merci beaucoup. That did the trick! Greg -Original Message- From: projetmbc [mailto:projet...@club-internet.fr] Sent: Thursday, June 25, 2009 3:56 AM To: projetmbc Cc: Greg Smith; PyQt Subject: Re: [PyQt] Using a QCompleter with a QLineEdit projetmbc a écrit : Try to do the following change : OLD lineEditCompleter = QtGui.QCompleter(completerList) NEW lineEditCompleter = QtGui.QCompleter(completerList) END Sorry, I've forgot to do the changes. Here there are. OLD lineEditCompleter = QtGui.QCompleter(completerList) NEW lineEditCompleter = QtGui.QCompleter(completerList, self) END === De rien... Christophe. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: Proeblems with pyuic4 utility in PyQt4.5.1
Never mind.. fixed by deleting all dirs related to PyQt and installing it again... maybe versions conflicts... Cheers. 2009/6/25 Gustavo A. Díaz gustavo.d...@gmail.com Hi Guys, I recently compiled in 2 computers, latest stable sip, as well PyQt4.5.1 and when i try to export the .ui file i get segfault: pyuic4 main.ui -o ../ui_main.py Fallo de segmentación (Segmentation Fault) dmesg says: python[31039]: segfault at 6ea01026 ip b7f3c5eb sp bfdb783c error 4 in libc-2.9.so[b7ec5000+15c000] Using Kubuntu Jaunty, compiled agaist python2.6.x, Qt4.5.x Cheers. -- 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] setLayout for a QDockWidget
On 25.06.09 18:56:57, TP wrote: Hi, Try the small script below. I cannot manage to do setLayout for a QDockWidget: QDockWidget.setWidget() works correctly, but not QDockwidget.setLayout(), I obtain the following message: QWidget::setLayout: Attempting to set QLayout on QDockWidget , which already has a layout So, with some googling, I found: http://lists.trolltech.com/pipermail/qt-interest/2008-December/000524.html http://www.qtcentre.org/forum/f-newbie-4/t-changing-layout-21394.html It seems that there is a default layout inside a QDockWidget when it is created. How to delete this default layout in PyQt, and then set as new layout vboxlayout with the spin box in the following code? Thats not the way to use QDockWidget, please look at the dockwidgets example and the API documentation to find out how to use that properly. Andreas -- You have Egyptian flu: you're going to be a mummy. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Thu, 25 Jun 2009 06:44:41 -0500, Dave Peterson dpeter...@enthought.com wrote: Hi Phil, Phil Thompson wrote: On Wed, 24 Jun 2009 12:54:37 -0500, Dave Peterson dpeter...@enthought.com wrote: I'm trying to build PyQt 4.5.1 from source on Mac OSX 10.5 x86 and I'm running into a problem right from the start in that the qtdirs.app built during the configure step won't run because it won't load QtCore. I've done an otool -L on qtdirs.app/Contents/MacOS/qtdirs and it doesn't have any path prefix in front of the reference to QtCore. Mine does. Right, when I do a build on another OS X box using the pre-built binary install of Qt 4.5.1, it also does. It has something like 'QtCore.framework/Versions/4/QtCore' (typing from memory as I'm not at that box right now). Note that my Qt install is *not* a standard install. It is a custom build installed into /Users/dpeterson/py/qtbuild/install/Qt-4.5.1-1.egg/EGG-INFO/usr. I have verified I can run all the Qt apps, tools, and demos from this install. I have exported QTDIR set to this path prior to invoking PyQt's configure.py script. It looks like the build of the qtdirs.app is picking up all the right paths for this install. But it looks to me like PyQt's qtdirs.app assumes that the various Qt frameworks are in the system location, even though configure explicitly passed the right location for my frameworks via a -F flag to g++. Is this a bug with PyQt's qtdirs build process? Is your QTDIR/bin directory on your PATH? Yup, it's the first entry in PATH. Forgot to mention that there is also a qt.conf in the .../EGG-INFO/usr/bin dir that just contains: [Paths] Prefix=/Users/dpeterson/py/qtbuild/install/Qt-4.5.1-1.egg/EGG-INFO/usr I'm new-ish to Qt but I believe that is right in that it points at the root of the install Qt dirtree? i.e. underneath that root dir are the bin, include, lib, mkspecs, plugins, etc. directories. Does that sound right or do I need to be explicit about the other possible path entries in the qt.conf? You shouldn't need a qt.conf file. If you are compiling Qt yourself then it isn't installed in any standard system location anyway. I build it myself, but to the standard location which is /usr/local/Trolltech. I'll trying building Qt in a non-default directory to see if I can reproduce the problem. Thanks much! I'm tearing my hair out trying to find out why that macho header reference isn't what it should be. Some additional thoughts I've had: 1) Could the presence of a QtCore.la and/or QtCore.prl file in the .../EGG-INFO/usr/lib dir be causing this? I looked at the contents of those, and they seem right to me, but then again I'm not 100% sure what they should be. 2) I thought perhaps there might be an issue with the library actually inside the QtCore.framework but I've verified that .../EGG-INFO/usr/lib/QtCore.framework/Versions/4/QtCore exists, and is the same as .../EGG-INFO/usr/lib/QtCore.framework/QtCore. Do both of those need to be there? I've built and installed Qt in a non-standard directory and PyQt has no problems with it. How did you configure, build and install Qt? Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Probleme with the metho description of QSciScintlla
Phil Thompson a écrit : On Mon, 15 Jun 2009 19:02:58 +0200, projetmbc projet...@club-internet.fr wrote: Hello, I'm always trying to make my own lexer but I don't have enough informtaion to start easily. I have to implement some methods but what have I to do with the method description. What part of... http://www.riverbankcomputing.com/static/Docs/QScintilla2/classQsciLexer.html#dd9c20adb43bc38d1a0ca3083ac3e6fa ...is causing you a problem? Phil A lot of questions about the documentation... * Am I right if I define my own lexer by the following way ? = class myLexer(Qsci.QsciLexerCustom): # Struggle for a lexer. def description(self, style): . def styleText(self, start, end): . def setStyling(self, lenght): . def startStyling(self, pos): . class myApplication(QtGui.QMainWindow, Ui_window): def __init__(self): QtGui.QMainWindow.__init__(self) Ui_window_LecteurCodePython_HTML.__init__(self) self.setupUi(self) self.textScintilla_Principal.setLexer(myLexer()) . = * The method styleText works line by line. Is it right ? How can we read the characters of the line so as to analyse them ? What is the self.method to use ? * When a word is detected, is its highlighting made by doing something like ? = def styleText(self, start, end): . self.startStyling(posOfTheFisrtCharacterOfTheWord) self.setStyling(lenghtOfTheWord) . = * This near to be the last question is to know how to acess to the color and the font properties of a character. * Is there some signal to do or not ? Have we have acces to some signal to know that something has been highlighted ? Best regards. Christophe who feels like a galley slave... :-) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
Hi Phil, Phil Thompson wrote: You shouldn't need a qt.conf file. I think I had problems running the Qt apps and demos if I didn't have that. I'll try without it again though. Perhaps this is a sign that my Qt install isn't really right? Or is it just needed in my case because I'm relocating my Qt install? (see below) I've built and installed Qt in a non-standard directory and PyQt has no problems with it. How did you configure, build and install Qt? The configure command was: ./configure -prefix /Users/dpeterson/py/qtbuild/tmp/Qt-4.5.1-1/install -debug -fast -no-exceptions -no-qt3support -qt-zlib -qt-libpng -qt-libmng -qt-libjpeg -opensource -confirm-license -arch x86 -R /PLACEHOLD/.../PLACEHOLD where the /PLACEHOLD/.../PLACEHOLD is actually a string of 20 * /PLACEHOLD. We use that to enable us to make the Qt binaries relocatable. Basically, we use macholib to replace all the /PLACEHOLD strings with the actual installed-to directory. Of course, we also have to find the tmp install path in the various associated text files and replace it with the actual installed directory too. The build command was: make -j1 QMAKE_RPATH=/PLACEHOLD/.../PLACEHOLD where the placehold serves the same purpose as above. Then the install process is effectively (a) zipping up the .../tmp/Qt-4.5.1-1/install directory and unzipping it into the desired location, then (b) running the post-installs scripts to fixup everything for the install path as mentioned above where I describe the configure process. -- Dave ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Thu, 25 Jun 2009 13:18:33 -0500, Dave Peterson dpeter...@enthought.com wrote: Hi Phil, Phil Thompson wrote: You shouldn't need a qt.conf file. I think I had problems running the Qt apps and demos if I didn't have that. I'll try without it again though. Perhaps this is a sign that my Qt install isn't really right? Or is it just needed in my case because I'm relocating my Qt install? (see below) I've built and installed Qt in a non-standard directory and PyQt has no problems with it. How did you configure, build and install Qt? The configure command was: ./configure -prefix /Users/dpeterson/py/qtbuild/tmp/Qt-4.5.1-1/install -debug -fast -no-exceptions -no-qt3support -qt-zlib -qt-libpng -qt-libmng -qt-libjpeg -opensource -confirm-license -arch x86 -R /PLACEHOLD/.../PLACEHOLD where the /PLACEHOLD/.../PLACEHOLD is actually a string of 20 * /PLACEHOLD. We use that to enable us to make the Qt binaries relocatable. Basically, we use macholib to replace all the /PLACEHOLD strings with the actual installed-to directory. Of course, we also have to find the tmp install path in the various associated text files and replace it with the actual installed directory too. The build command was: make -j1 QMAKE_RPATH=/PLACEHOLD/.../PLACEHOLD where the placehold serves the same purpose as above. Then the install process is effectively (a) zipping up the .../tmp/Qt-4.5.1-1/install directory and unzipping it into the desired location, then (b) running the post-installs scripts to fixup everything for the install path as mentioned above where I describe the configure process. ...you're on your own I think. The qtdirs utility is built using your Qt's qmake. configure.py isn't doing any special at that point, so I suspect you might have similar problems with any C++ code. You could try running qmake manually on the qtdirs.pro file that configure.py will have left lying around, and then run make, and then the qtdirs it produces. If it fails to run then it's a problem with your Qt build. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
Hi Phil, Phil Thompson wrote: I've built and installed Qt in a non-standard directory and PyQt has no problems with it. BTW, I want to thank you for making that kind of effort. I know it takes quite awhile to build Qt from source! Anyway, I've temporarily given up on using a custom-compiled, relocatable Qt and just want to get PyQt built. I'm wondering if it's possible to build sip and PyQt within a virtualenv linked to a Python.framework build? I notice there is code in sip to try and prevent that, but I didn't see any comments about why it won't work. So for grins, I tried commenting out the check for Python.framework in sys.executable and building sip. It builds just fine. I packaged it in a relocatable egg, and added a post-install script to fixup the _pkg_config dictionary in sipconfig.py when the egg is installed. There don't seem to be any other paths to fix up in any other text file, nor any lib references in macho headers. I then tried to build PyQt with the following configuration command: python configure.py --trace --verbose --confirm-license -b /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install/bin -d /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install -p /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install/plugin -v /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install/sip which runs just fine. But the actual build dies with the following error output. Could this be related to trying to build PyQt within a virtualenv? Or is it simply something wrong with my sip install? Or is there some mismatch between PyQt 4.5.1, sip 4.8.1, and Qt 4.5.1 on OS X? g++ -c -pipe -fno-strict-aliasing -Os -fPIC -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -I/Users/dpeterson/py/qtbuild/install/sip-4.8.1-1.egg/EGG-INFO/usr/include -I../../QtCore -I. -I. -F/Library/Frameworks -o qpycore_chimera.o qpycore_chimera.cpp qpycore_chimera.cpp: In member function ‘bool Chimera::parse_cpp_type(const QByteArray)’: qpycore_chimera.cpp:392: error: too few arguments to function make[2]: *** [qpycore_chimera.o] Error 1 make[1]: *** [all] Error 2 make: *** [all] Error 2 -- Dave ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
Phil Thompson wrote: On Thu, 25 Jun 2009 13:18:33 -0500, Dave Peterson dpeter...@enthought.com wrote: ...you're on your own I think. I had a feeling you'd say that. :-) I appreciate the responses you've made so far. The qtdirs utility is built using your Qt's qmake. configure.py isn't doing any special at that point, so I suspect you might have similar problems with any C++ code. You could try running qmake manually on the qtdirs.pro file that configure.py will have left lying around, and then run make, and then the qtdirs it produces. If it fails to run then it's a problem with your Qt build. Yup, I actually already tried that so I could play around with various options. I've looked through the generated qtdirs.mk to look for anything wrong there, but not found anything. :-( I've also tried manually running the various g++ compilation commands to build qtdirs so I could play with the option flags there too. Nothing I've tried seems to have any effect on this issue. :-( -- Dave ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Thu, 25 Jun 2009 16:47:56 -0500, Dave Peterson dpeter...@enthought.com wrote: Dave Peterson wrote: You could try running qmake manually on the qtdirs.pro file that configure.py will have left lying around, and then run make, and then the qtdirs it produces. If it fails to run then it's a problem with your Qt build. Yup, I actually already tried that so I could play around with various options. I've looked through the generated qtdirs.mk to look for anything wrong there, but not found anything. :-( I've also tried manually running the various g++ compilation commands to build qtdirs so I could play with the option flags there too. Nothing I've tried seems to have any effect on this issue. :-( So perhaps the issue is simply that I didn't know what to look for in the qtdirs.mk? As a better check, I just tried diff'ing a qtdirs.mk from my custom-built Qt install versus one from the official binary install. For the most part the only differences are in the paths to the various Qt installed bits. However, I've noted the following which looks super relevant. I just don't know how this stuff gets generated so I'm not sure how to go about debugging / fixing it. Any advice? In the qtdirs.mk done against my custom-built Qt install, the INCPATH definition on line 16 includes a -I/Users/dpeterson/py/qtbuild/install/Qt-4.5.1-1.egg/EGG-INFO/usr/include/QtCore whereas the one generated from the official Qt 4.5.1 install has -I/Library/Frameworks/QtCore.framework/Versions/4/Headers in the same position. BTW: The qtdirs.pro files are exactly the same across the two different attempts. BTW: a qmake -query from each environment shows what looks like the right paths, but again I may be confused about what they should be. From the official Qt binary install, the QT_INSTALL_LIBS output is /Library/Frameworks which I note only contains the Qt frameworks. But in my custom-built Qt environment, QT_INSTALL_LIBS points at .../EGG_INFO/usr/lib which contains both the Qt framework bundles, plus a number of *.la files (one per framework bundle) and a few libQtCLucene*.dylib and associated libQtCLucene.(la | prl) files. Is it possible that these .la files or the mixing of frameworks and dylibs is causing the difference in behavior? I'll try deleting them now. They shouldn't make a difference - they are present in my standard self-built version. The directory layout you get when using the binary installer is different than what you get if you do your own standard build. I never use the installers because, historically at least, they've had problems. So if you want to compare your non-standard build with something that will work I'd do a standard built of your own. To build Qt... ./configure -prefix $HOME/qt-4.5.2 make make install To build PyQt... python configure.py -q $HOME/qt-4.5.2/bin/qmake That should give you a working PyQt and you can compare properly. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Thu, 25 Jun 2009 16:12:17 -0500, Dave Peterson dpeter...@enthought.com wrote: Hi Phil, Phil Thompson wrote: I've built and installed Qt in a non-standard directory and PyQt has no problems with it. BTW, I want to thank you for making that kind of effort. I know it takes quite awhile to build Qt from source! Anyway, I've temporarily given up on using a custom-compiled, relocatable Qt and just want to get PyQt built. I'm wondering if it's possible to build sip and PyQt within a virtualenv linked to a Python.framework build? It's fine as far as I'm aware. I notice there is code in sip to try and prevent that, but I didn't see any comments about why it won't work. No, the check is making sure it *is* a framework build of Python. So for grins, I tried commenting out the check for Python.framework in sys.executable and building sip. It builds just fine. I packaged it in a relocatable egg, and added a post-install script to fixup the _pkg_config dictionary in sipconfig.py when the egg is installed. There don't seem to be any other paths to fix up in any other text file, nor any lib references in macho headers. I then tried to build PyQt with the following configuration command: python configure.py --trace --verbose --confirm-license -b /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install/bin -d /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install -p /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install/plugin -v /Users/dpeterson/py/qtbuild/tmp/PyQt-4.5.1-1/install/sip which runs just fine. But the actual build dies with the following error output. Could this be related to trying to build PyQt within a virtualenv? Or is it simply something wrong with my sip install? Or is there some mismatch between PyQt 4.5.1, sip 4.8.1, and Qt 4.5.1 on OS X? g++ -c -pipe -fno-strict-aliasing -Os -fPIC -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.5/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -I/Users/dpeterson/py/qtbuild/install/sip-4.8.1-1.egg/EGG-INFO/usr/include -I../../QtCore -I. -I. -F/Library/Frameworks -o qpycore_chimera.o qpycore_chimera.cpp qpycore_chimera.cpp: In member function ‘bool Chimera::parse_cpp_type(const QByteArray)’: qpycore_chimera.cpp:392: error: too few arguments to function make[2]: *** [qpycore_chimera.o] Error 1 make[1]: *** [all] Error 2 make: *** [all] Error 2 Sound like you've got bits (maybe sip.h) of an older version of SIP lying around. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
Phil Thompson wrote: They shouldn't make a difference - they are present in my standard self-built version. Okay, thanks for reminding me of a better way to compare apples-to-apples. :-) To build Qt... ./configure -prefix $HOME/qt-4.5.2 make make install To build PyQt... python configure.py -q $HOME/qt-4.5.2/bin/qmake That should give you a working PyQt and you can compare properly. Will PyQt 4.5.1 build against Qt 4.5.2? I thought I ran into version mismatches when they weren't the same previously, though that may have been when I mistakenly download a higher version PyQt than the Qt I had. -- Dave ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Thu, 25 Jun 2009 17:15:56 -0500, Dave Peterson dpeter...@enthought.com wrote: Phil Thompson wrote: They shouldn't make a difference - they are present in my standard self-built version. Okay, thanks for reminding me of a better way to compare apples-to-apples. :-) To build Qt... ./configure -prefix $HOME/qt-4.5.2 make make install To build PyQt... python configure.py -q $HOME/qt-4.5.2/bin/qmake That should give you a working PyQt and you can compare properly. Will PyQt 4.5.1 build against Qt 4.5.2? I thought I ran into version mismatches when they weren't the same previously, though that may have been when I mistakenly download a higher version PyQt than the Qt I had. Yes - the similarity between the Qt and PyQt version numbers is entirely coincidental. All versions of PyQt4 should compile against all versions of Qt4. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
Dave Peterson wrote: Phil Thompson wrote: To build Qt... ./configure -prefix $HOME/qt-4.5.2 make make install Just curious if you have any recommendations or thoughts regarding pros/cons of using the '-no-framework' option? -- Dave ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] qtdirs.app can't load QtCore
On Thu, 25 Jun 2009 17:21:08 -0500, Dave Peterson dpeter...@enthought.com wrote: Dave Peterson wrote: Phil Thompson wrote: To build Qt... ./configure -prefix $HOME/qt-4.5.2 make make install Just curious if you have any recommendations or thoughts regarding pros/cons of using the '-no-framework' option? None - it's all black magic to me. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Problem with QSciScintlla
Hello, why the following code doesn't print anything in the console ? Best regards. Christophe # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\Documents and Settings\Christophe\Mes documents\2,pyBaNaMa\DebuterAvecPythonEtPyQT\CodesProjets\04-Proj4_MiniEditHTML\05-TestColorSyntax(WebKit)\window_LecteurCodePython_HTML.ui ' # # Created: Thu Aug 28 12:37:43 2008 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_window_LecteurCodePython_HTML(object): def setupUi(self, window_LecteurCodePython_HTML): window_LecteurCodePython_HTML.setObjectName(window_LecteurCodePython_HTML) window_LecteurCodePython_HTML.resize(516, 397) self.centralwidget = QtGui.QWidget(window_LecteurCodePython_HTML) self.centralwidget.setObjectName(centralwidget) self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(verticalLayout) self.textScintilla_Principal = Qsci.QsciScintilla(self.centralwidget) self.textScintilla_Principal.setObjectName(textScintilla_Principal) self.verticalLayout.addWidget(self.textScintilla_Principal) window_LecteurCodePython_HTML.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(window_LecteurCodePython_HTML) self.menubar.setGeometry(QtCore.QRect(0, 0, 516, 21)) self.menubar.setObjectName(menubar) self.menuFichier = QtGui.QMenu(self.menubar) self.menuFichier.setObjectName(menuFichier) window_LecteurCodePython_HTML.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(window_LecteurCodePython_HTML) self.statusbar.setObjectName(statusbar) window_LecteurCodePython_HTML.setStatusBar(self.statusbar) self.actionOuvrir = QtGui.QAction(window_LecteurCodePython_HTML) self.actionOuvrir.setObjectName(actionOuvrir) self.actionEnregistrer = QtGui.QAction(window_LecteurCodePython_HTML) self.actionEnregistrer.setObjectName(actionEnregistrer) self.actionExporterHTML = QtGui.QAction(window_LecteurCodePython_HTML) self.actionExporterHTML.setObjectName(actionExporterHTML) self.menuFichier.addAction(self.actionOuvrir) self.menuFichier.addAction(self.actionEnregistrer) self.menuFichier.addSeparator() self.menuFichier.addAction(self.actionExporterHTML) self.menubar.addAction(self.menuFichier.menuAction()) self.retranslateUi(window_LecteurCodePython_HTML) QtCore.QMetaObject.connectSlotsByName(window_LecteurCodePython_HTML) def retranslateUi(self, window_LecteurCodePython_HTML): window_LecteurCodePython_HTML.setWindowTitle(QtGui.QApplication.translate(window_LecteurCodePython_HTML, MainWindow, None, QtGui.QApplication.UnicodeUTF8)) self.menuFichier.setTitle(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Actions, None, QtGui.QApplication.UnicodeUTF8)) self.actionOuvrir.setText(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Ouvrir, None, QtGui.QApplication.UnicodeUTF8)) self.actionOuvrir.setShortcut(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Ctrl+O, None, QtGui.QApplication.UnicodeUTF8)) self.actionEnregistrer.setText(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Rechercher, None, QtGui.QApplication.UnicodeUTF8)) self.actionEnregistrer.setShortcut(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Ctrl+S, None, QtGui.QApplication.UnicodeUTF8)) self.actionExporterHTML.setText(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Exporter, None, QtGui.QApplication.UnicodeUTF8)) self.actionExporterHTML.setShortcut(QtGui.QApplication.translate(window_LecteurCodePython_HTML, Ctrl+E, None, QtGui.QApplication.UnicodeUTF8)) from PyQt4 import Qsci if __name__ == __main__: import sys app = QtGui.QApplication(sys.argv) window_LecteurCodePython_HTML = QtGui.QMainWindow() ui = Ui_window_LecteurCodePython_HTML() ui.setupUi(window_LecteurCodePython_HTML) window_LecteurCodePython_HTML.show() sys.exit(app.exec_()) # -*- coding: utf-8 -*- #!/usr/bin/env python import sys from PyQt4 import QtCore, QtGui, Qsci from window_LecteurCodePython_HTML import Ui_window_LecteurCodePython_HTML class monLexer(Qsci.QsciLexerCustom): def description(self, style): return 'Style No ' + str(style) def styleText(self, start, end): print '(start, end)' print self [start, start+1] def setStyling(self, lenght, style_bits = 0): print '(lenght, style_bits)' print (lenght, style_bits) def startStyling(self, pos, style_bits = 0): print '(pos, style_bits)' print (pos, style_bits) class window_LecteurCodePython_HTML(QtGui.QMainWindow, Ui_window_LecteurCodePython_HTML):
[PyQt] Refresh QSqlRelation
Hello I have a QTableView with a QSqlRelationalTableModel as its datasource. I want to allow a user to edit the table view, including being able to edit/add records to the relation without refreshing the tableview until its model is manually submitted. How do I do this? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt