Re: [PyQt] Where to start

2011-06-03 Thread diego
I am trying to do is display an image, and then using drag-selection to select a sub-image for later processing. Eventually I want to be able to select multiple regions and tag each region for appropruate back end processing, but for now just being able to select one sub-image would be good.

Re: [PyQt] Where to start

2011-06-03 Thread David Boddie
On Fri Jun 3 15:24:55 BST 2011, diego wrote: [...] def mouseMoveEvent(self, event): if event.button() == Qt.LeftButton: [...] you check if the value retured by QMouseEvent.button() is Qt.LeftButton but in

[PyQt] QAbstractListModel.setData gets passed a QVariant that cannot be converted to user data type

2011-06-03 Thread Thorben Kroeger
Hello everyone, I'm implementing a QAbstractListModel derived class in PyQt that uses a custom data type. However, in QAbstractListModel.setData(index, value, role = Qt.EditRole), I get passed value as a QVariant, and I cannot convert it to my custom type: value.toPyObject() yields:

[PyQt] Getting image filename in QLabel-pixmap

2011-06-03 Thread James Polk
Let's say you create a QLabel and make it an icon, by associating an image file to it,.. like..   thisPixmap  = QtGui.QPixmap('server:/images/airplane.jpg') )   thisIcon = QtGui.QLabel(self)   thisIcon.setPixmap(thisPixmap) Now let's say that later, in another function...you need