Re: [PyQt] upgrade to ubuntu 10.04 -- problem with graphics
Thanks for the help. I shall modify the code and look at the example too. I also decided to re-install. Shall report on results. Cheers, Heinz On 09/04/2010 03:30 PM, David Boddie wrote: On Sat Sep 4 08:00:06 BST 2010, Preisig, Heinz A wrote: After upgrading Ubuntu 9.10 to 10.04 I encounter some problems with running a graphics application I built last year. It uses the mechanisms described in the example elasticnodes. The two application represent a graph, which when moving the nodes also update the location of the arcs. In both cases the arcs are not updated. In fact the example does not show the arcs when starting it. My application does show the arcs, but it does not update. I dug for some hours in the code, but could not find a problem. It seems it does not get into the itemChange method of the QGraphicsItem class. Some manipulations resulted in abortion of the task, which when running from within Eclipse did not produce an error message. From the terminal I got an occasional segmentation fault. I don't know why you are getting segmentation faults, but the problem with the itemChange method is due to a change in behaviour in Qt 4.6. You now need to call the item's setFlag method with the ItemSendsGeometryChanges flag to get notifications when items move. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Heinz A Preisig Professor of Process Systems EngineeringPrivate: Øvre Bakklandet 62 B, 7013 Trondheim, Norway Department of Chemical Engineering Norwegian University of Science and Technology N -- 7491 Trondheim, Norway Tel direct: +47 735 92807 Tel mob: +47 9754 1334 e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] vertical alignment of richtext in a table view
Hi, in Mark Summerfields book Rapid GUI programming with Python and QT, there is an example on page 485 with a table column having a delegate that displays richtext. In the book, the text in this column has a vertical alignment in the middle of the cells, just like the other columns. but if I execute that example (from the downloadable source: chap16/carhirelog.pyw), the rich text is vertically not in the middle but above. How can I make it align vertically just like a normal column? His book has another such table chap14, page 436 / ships_delegate.pyw. Here, both the image in the book and the executable show the same wrong vertical alignment. BTW interesting things happen if the column with richtext is resized to a minimum: the delegate draws outside of its available horizontal space, showing text to the right of the rightmost column. (using pyqt 4.7.3 with qt4-4.7.0-rc1) this is the paint of the delegate: def paint(self, painter, option, index): text = index.model().data(index, Qt.DisplayRole).toString() palette = QApplication.palette() document = QTextDocument() document.setDefaultFont(option.font) if option.state QStyle.State_Selected: document.setHtml(QString(font color=%1%2/font) \ .arg(palette.highlightedText().color().name()) \ .arg(text)) else: document.setHtml(text) painter.save() color = palette.highlight().color() \ if option.state QStyle.State_Selected \ else QColor(index.model().data(index, Qt.BackgroundColorRole)) painter.fillRect(option.rect, color) painter.translate(option.rect.x(), option.rect.y()) document.drawContents(painter) painter.restore() -- Wolfgang ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] ANN: eric 4.4.8 released
Hi, I just uploaded eric 4.4.8. It is a maintenance release fixing some bugs. It is available via the eric 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
[PyQt] ANN: eric 5.0.2 released
Hi, I just uploaded eric 5.0.2. It is a maintenance release fixing some bugs. It is available via the eric 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
[PyQt] Qt.MatchFlags AND comparison
Having a hard time figuring something that should be simple. If I do Qt.MatchWildcard Qt.MatchContains, it returns 1, but if I do Qt.MatchContains anything else (other than Qt.MatchContains itself) it returns 0 as expected. What am I doing wrong, and how am I supposed to compare my flags to a specific flag other than doing bitwise AND against the other flag? -- View this message in context: http://old.nabble.com/Qt.MatchFlags-AND-comparison-tp29627864p29627864.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Qt.MatchFlags AND comparison
On Sun, 5 Sep 2010 09:37:19 -0700 (PDT), Demetrius Cassidy dcassid...@mass.rr.com wrote: Having a hard time figuring something that should be simple. If I do Qt.MatchWildcard Qt.MatchContains, it returns 1, but if I do Qt.MatchContains anything else (other than Qt.MatchContains itself) it returns 0 as expected. What am I doing wrong, and how am I supposed to compare my flags to a specific flag other than doing bitwise AND against the other flag? You need to read the docs more closely - particularly related to the actual numerical value. It's a badly designed type - the lower 3 bits behave like an enum (ie. mutually exclusive), the remaining bits behave like flags. It should really be split into a MatchType enum and a MatchModifier set of flags. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] PyQt4 4.7.5 configure fails under Python7 and sip 4.11
Using PyQt-win-gpl-4.7.5 with sip 4.11 under Python7, configure fails with a syntax error executing sip: C:\Documents and Settings\dcassidy\My Documents\Downloads\PyQt-win-gpl-4.7.5\PyQ t-win-gpl-4.7.5python configure.py --confirm-license Determining the layout of your Qt installation... This is the GPL version of PyQt 4.7.5 (licensed under the GNU General Public License) for Python 2.7 on win32. Checking to see if the QtGui module should be built... Checking to see if the QtHelp module should be built... Checking to see if the QtMultimedia module should be built... Checking to see if the QtNetwork module should be built... Checking to see if the QtOpenGL module should be built... Checking to see if the QtScript module should be built... Checking to see if the QtScriptTools module should be built... Checking to see if the QtSql module should be built... Checking to see if the QtSvg module should be built... Checking to see if the QtTest module should be built... Checking to see if the QtWebKit module should be built... Checking to see if the QtXml module should be built... Checking to see if the QtXmlPatterns module should be built... Checking to see if the phonon module should be built... Checking to see if the QtAssistant module should be built... Checking to see if the QtDesigner module should be built... Checking to see if the QAxContainer module should be built... Qt v4.6.2 free edition is being used. SIP 4.11 is being used. The Qt header files are in C:\Qt\2010.02.1\qt\include. The shared Qt libraries are in C:\Qt\2010.02.1\qt\lib. The Qt binaries are in C:\Qt\2010.02.1\qt\bin. The Qt mkspecs directory is in C:\Qt\2010.02.1\qt. These PyQt modules will be built: QtCore, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL, QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml, QtXmlPatterns, phonon, QtAssistant, QtDesigner, QAxContainer. The PyQt Python package will be installed in C:\Python27\Lib\site-packages. PyQt is being built with generated docstrings. The Designer plugin will be installed in C:\Qt\2010.02.1\qt\plugins\designer. The PyQt .sip files will be installed in C:\Python27\sip\PyQt4. pyuic4, pyrcc4 and pylupdate4 will be installed in C:\Python27. Generating the C++ source for the QtCore module... sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I d ir] [-j #] [-k] [-m file] [-o] [-p module] [-P] [-r] [-s suffix] [-t tag] [-w] [ -x feature] [-z file] [file] Error: Unable to create the C++ code. -- View this message in context: http://old.nabble.com/PyQt4-4.7.5-configure-fails-under-Python7-and-sip-4.11-tp29627880p29627880.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Composite widgets?
Prior to embarking on learning PyQt, I wrote my GUI applications using Tkinter and Pmw. The Pmw widget set is quite nice and provides a library of composite classes using the Tkinter widgets. My question is: Is there any (similar) composite widgets in PyQt? i.e. Pmw has the EntryField widget, which combines the (commonly used case) of a Label and a LineEdit into the one class - much more convenient than always having to specify the two entities separately, which seems to be the case with PyQt? The EntryField widget offers far more than just conveniently creating a Label and a LineEdit in the one class, it also allows definition of entry validation as well, so you can see that the composite classes provide quite a high level of functional behaviour to the user. Pmw defines other composite widgets like: RadioSelect - which groups radio buttons (well, you have the choice of defining it to handle radio buttons, check buttons or normal buttons). Of course in PyQt I have found the QGroupBox class, but this only performs a (small) part of what the Pmw RadioSelect widget does. Do such composite widgets exist? am I missing something in the PyQt documentation? Thanks Peter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Labelled QGraphicsItem
Hi, all, I'd like to have QGraphicsItems (squares and circles) that have editable QGraphicsTextItems attached to them. I can do this with a QGraphicsItemGroup or use two items (connected with an instance variable), but I want the ability to, at times, move the labels around the item (independent of the group moving), edit them, and even do batch moves like center all selected item labels inside the attached QGraphicsItem. I'll be adding/removing these labelled items to/from a QGraphicsScene using the QUndoStack. Does anyone know of a simpler/better way to do this or perhaps have a class already made to be used directly or as an example? Thanks! Jeff. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt