Re: [PyQt] Signals with QGraphicsPixmapItem

2010-06-11 Thread Philippe Crave
you should inherit qgraphicsobject http://doc.qt.nokia.com/4.6/qgraphicsobject.html 2010/6/11 dizou : > > I am using QGraphicsPixmapItems in a QGraphicsScene. How can I get the > QGraphicsPixmapItems to emit a signal since they don't inherit QObject? > There is no multiple inheritance support eith

[PyQt] Fwd: QStandardItem check state

2010-06-11 Thread Jamie Riotto
He, Hopefully this helps: from PyQt4.QtCore import * from PyQt4.QtGui import * import sys from random import randint class view(QListView):    def __init__(self, parent=None):        super(view, self).__init__(parent)        model = QStandardItemModel()        for n in range(10):            i

Re: [PyQt] Multiple inheritance with pyqt and python class

2010-06-11 Thread Phil Thompson
On Fri, 11 Jun 2010 13:06:10 -0700, brian downing wrote: > I know multiple inheritance with 2 pyqt objects isn't allowed. Is there > any problems with a single pyqt object and another python class? > > Here is an example: > - > class myMethods: > def _

Re: [PyQt] Bug with QWidget masks in QGraphicsScene?

2010-06-11 Thread Jeremy
Hi Matteo, First, thanks for your reply! Unfortunately, I'm not sure your solution would work for what I'm trying to do (as is). In essence, I'm trying to create a GUI with several irregularly shaped buttons, whose bounding boxes overlap (but not the actual shapes). (For example, think of a

[PyQt] Multiple inheritance with pyqt and python class

2010-06-11 Thread brian downing
I know multiple inheritance with 2 pyqt objects isn't allowed. Is there any problems with a single pyqt object and another python class? Here is an example: - class myMethods: def __init__(self, val): self.val=val def method1(self): …. classMyWidget(Q

[PyQt] Signals with QGraphicsPixmapItem

2010-06-11 Thread dizou
I am using QGraphicsPixmapItems in a QGraphicsScene. How can I get the QGraphicsPixmapItems to emit a signal since they don't inherit QObject? There is no multiple inheritance support either. -- View this message in context: http://old.nabble.com/Signals-with-QGraphicsPixmapItem-tp28859505p28859

Re: [PyQt] Bug with QWidget masks in QGraphicsScene?

2010-06-11 Thread Matteo Boscolo
Hi Jeremy, I did some test and I notice that if you use the .. graphics_view.setMask() you get the get some problem. I do not why The view work in this way..I'm not so skilled in qt to help you. But a work around could be: graphics_scene.mousePressEvent =myMouseEvent #to get the mouse click

[PyQt] QStandardItem check state

2010-06-11 Thread He Jibo
Hell, I am trying to build a selection tree, as below. I hope to which files are checked. O filename1 O filename2 O filename3 O filename4 .. I find the following codes fit my need well. But I do not know how to get the check state signal. I hope, *each time an item is checked or unchecked,

[PyQt] Bug with QWidget masks in QGraphicsScene?

2010-06-11 Thread Jeremy
Hello, I have a question (which may stem from either a bug in PyQt, Qt, or just my understanding of how Qt is supposed to work). In particular, according to the Qt documentation (http://doc.trolltech.com/4.6/qwidget.html#setMask) masked widgets are only supposed to receive mouse events on the

[PyQt] Segfault in QTextItem::font

2010-06-11 Thread Jeremy Sanders
Hi - I've got another segfault with the latest snapshot of qt and sip: #0 0x7fffef1ded48 in QExplicitlySharedDataPointer::data (this=0x3e) at ../../include/QtCore/../../src/corelib/tools/qshareddata.h:138 #1 0x7fffef1d943c in QFont::QFont (this=0x1d58ac0, font=...) at text/