[PyQt] [PyQt 4.5 Bug] Derived signals do not present

2009-04-09 Thread Alexandr N Zamaraev
Code for reproduce: [code=python] from PyQt4 import QtGui sm = QtGui.QSortFilterProxyModel() sm.modelReset.conncet(lambda: None) [/code] Traceback (most recent call last): File C:\Lang\test\python\PyQtSignalBug\QtSortProxy.py, line 4, in module sm.modelReset.conncet(lambda: None)

Re: [PyQt] context menus for QTreeWidgetItem?

2009-04-09 Thread projetmbc
Christian Aubert a écrit : I currently have a context menu for the whole QTreeWidget but I need finer-grained control on a per item basis. Has anyone implemented context menus for QTreeWidgetItems? Any pointers? Christian ___ PyQt mailing list

Re: [PyQt] SplashScreen and mousePressEvent

2009-04-09 Thread projetmbc
Thanks, I'll try to understand that. Maybe my problem is a problem of windowflag. Where are all the avaibale windowflag ? Best reagrds and a great thanks for your help. Christophe. Apologies for the C++ code, we have an info label that displays text in a popup QFrame, this is the method that

Re:Re: [PyQt] context menus for QTreeWidgetItem?

2009-04-09 Thread projetmbc
Christian Aubert a écrit : I currently have a context menu for the whole QTreeWidget but I need finer-grained control on a per item basis. Has anyone implemented context menus for QTreeWidgetItems? Any pointers? Christian ___ PyQt mailing list

[PyQt] [PyQt 4.5] TypeError: pyqtBoundSignal cannot be converted to QObject in this context

2009-04-09 Thread Alexandr N Zamaraev
I try port my applications to PyQt 4.5 And I recive TypeError: [code] Traceback (most recent call last): ... File C:\Lang\Projects\Promsoft\mun_ob\doc_circ\src\links\DataRightOwner.py, line 48, in __init__ self.__connectAll() File

[PyQt] Re: Connecting two QGraphicsItems

2009-04-09 Thread Wolfgang Rohdewald
On Thursday, 9. April 2009, Mads wrote: is it possible to control the position of the item? just use item.setPos() - this uses a coordinate system relative to the parent item. -- Wolfgang ___ PyQt mailing listPyQt@riverbankcomputing.com

[PyQt] Bug: PyQt causes Python to abnormally exit upon creating QWidget without a QApplication

2009-04-09 Thread Shriramana Sharma
Hello. See the following: $ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type help, copyright, credits or license for more information. from PyQt4.QtGui import * w = QWidget () QWidget: Must construct a QApplication before a QPaintDevice

[PyQt] will pyqt follow qt license model?

2009-04-09 Thread jelle feringa
Hi, I've searched this mailing list and although the QT lgpl news was discussed at length, but I couldnt distill from this list whether pyqt will follow qt's licensing model. Has this been decided yet? Thanks, -jelle ___ PyQt mailing list

Re: [PyQt] [SIP][PATCH]Errors occurring during execution of python __dtor__() function called from sip are discarded

2009-04-09 Thread Phil Thompson
On Mon, 06 Apr 2009 10:04:35 +0200, Alexis Boutillier alexis.boutill...@arteris.com wrote: Hi, When sip call the __dtor__() python function on a python object, it does not print errors that occurred during the execution of the python function. If something goes wrong in this function you

Re: [PyQt] Possible bug - global coordinates work but widget coordinates do not

2009-04-09 Thread Phil Thompson
On Wed, 08 Apr 2009 20:26:55 +0530, Shriramana Sharma samj...@gmail.com wrote: Hello first of all let me clarify that this is specific to PyQt and does not existing in C++/Qt. I am using PyQt 4.3.3 on Qt 4.4.0 on Kubuntu Hardy. I attach three files. 1. test.py is the one that demonstrates

Re: [PyQt] Re: Connecting two QGraphicsItems

2009-04-09 Thread Mads
Thanks for the replies. Using setParent works fine for one item, but is it possible to control the position of the item? I mean is it possible to place the EllipseItem at a certain point on the GraphicsItem, so the EllipseItems don't get placed at the same point. Mads - Original

Re: [PyQt] SplashScreen and mousePressEvent - SOLVED

2009-04-09 Thread projetmbc
Hello. Finaly here is the solution to have a frame where the cursor is. We have to use setGeomtry and not setRectangle. Best regards. Christophe. == THE CODE == class MyFrame(QtGui.QFrame): def __init__(self, parent, titre, pixmapfile): QtGui.QFrame.__init__(self,

Re: [PyQt] Bug: PyQt causes Python to abnormally exit upon creating QWidget without a QApplication

2009-04-09 Thread Andreas Pakulat
On 09.04.09 13:45:47, Shriramana Sharma wrote: Hello. See the following: $ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type help, copyright, credits or license for more information. from PyQt4.QtGui import * w = QWidget ()

Re: [PyQt] [PyQt 4.5 Bug] Derived signals do not present

2009-04-09 Thread Phil Thompson
On Thu, 09 Apr 2009 13:15:24 +0700, Alexandr N Zamaraev to...@promsoft.ru wrote: Code for reproduce: [code=python] from PyQt4 import QtGui sm = QtGui.QSortFilterProxyModel() sm.modelReset.conncet(lambda: None) [/code] Traceback (most recent call last): File

Re: [PyQt] QAbstractItemModel modelAboutToBeReset signal

2009-04-09 Thread Phil Thompson
On Wed, 8 Apr 2009 11:55:39 -0400, Patrick Boucher pbouc...@patrickboucher.com wrote: Hi all, I've subclassed QAbstractItemModel and overloaded reset to be: def reset(self): self.modelAboutToBeReset.emit() self._loadPeople() self.modelReset.emit() and I get

Re: [PyQt] [PyQt 4.5] TypeError: pyqtBoundSignal cannot be converted to QObject in this context

2009-04-09 Thread Phil Thompson
On Thu, 09 Apr 2009 15:13:27 +0700, Alexandr N Zamaraev to...@promsoft.ru wrote: I try port my applications to PyQt 4.5 And I recive TypeError: [code] Traceback (most recent call last): ... File C:\Lang\Projects\Promsoft\mun_ob\doc_circ\src\links\DataRightOwner.py, line 48, in

Re: [PyQt] QAbstractItemModel modelAboutToBeReset signal

2009-04-09 Thread Patrick Boucher
Thanks! Patrick On Thu, Apr 9, 2009 at 8:57 AM, Phil Thompson p...@riverbankcomputing.com wrote: On Wed, 8 Apr 2009 11:55:39 -0400, Patrick Boucher pbouc...@patrickboucher.com wrote: Hi all, I've subclassed QAbstractItemModel and overloaded reset to be:     def reset(self):        

[PyQt] segfault when using a proxy and SIGNAL( clicked(QModelIndex) )

2009-04-09 Thread TP
Hi everybody, Here you will find a small (170 lines) self-contained Python script. http://paratribulations.free.fr/help/python/simpleproxy.py I use a model, and a proxy (that does nothing, but in a more complicated version, not given here, it works perfectly). The view is a QTreeView. The

Re: [PyQt] How do you close a QDialog?

2009-04-09 Thread Demetrius Cassidy
You should read the Python tutorial. It would probably help. http://docs.python.org/tutorial/ GatorAlli wrote: Thanks! It worked! =) Now how could you run this dialog from another script? (I'm no good at self, classes, and inheritance.) -- View this message in context:

Re: [PyQt] context menus for QTreeWidgetItem?

2009-04-09 Thread Christian Aubert
I had this from the previous contextMenu that covered the whole treeWidget: self.treeWidget.setContextMenuPolicy(Qt.ActionsContextMenu) After I changed the line to this (makes sense), everything's all good: self.treeWidget.setContextMenuPolicy(Qt.CustomContextMenu) Thanks to everyone who

Re: [PyQt] How do you close a QDialog?

2009-04-09 Thread Demetrius Cassidy
I don't follow 100%, but I guess you have say a GameMainWindow (non Qt), and you want to open a new QtDialog from within your MainWindow? The problem might be if you run your own even loop, then you run PyQt's event loop, messages for your window are no longer being received, causing the

Re: [PyQt] [PyQt 4.5] TypeError: pyqtBoundSignal cannot be converted to QObject in this context

2009-04-09 Thread Alexandr N Zamaraev
Phil Thompson wrote: def __connectAll(self): for dm in (self.__phys, self.__jur, self.__bus): dm.data_adds.connect(self.data_adds.emit) I don't understand what you are trying to do in the last line. It may well be more intuitive: [code] class DataLink(QtCore.QObject):