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.
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
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:
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