mshemuni
7th September 2012, 22:28
I have a QLabel and I'm displaying an image on it.
I'll get coordinate when I clicked on Qlabel.
There is some stars on my picture and I most find those coordinates.
How can I do it?
I hold images paths on a QListWidget named listWidgetPhoto. And when I clicked on listWidgetPhoto displayImage() will work.
def displayImage(self):
imagePath=self.listWidgetPhoto.currentItem()
print(imagePath.text())
self.label.setPixmap(QtGui.QPixmap(_fromUtf8(image Path.text())))
My sys.version output:
2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3]
My OS:
bq. Ubuntu
Release 12.04 (precise) 32-bit
I'll get coordinate when I clicked on Qlabel.
There is some stars on my picture and I most find those coordinates.
How can I do it?
I hold images paths on a QListWidget named listWidgetPhoto. And when I clicked on listWidgetPhoto displayImage() will work.
def displayImage(self):
imagePath=self.listWidgetPhoto.currentItem()
print(imagePath.text())
self.label.setPixmap(QtGui.QPixmap(_fromUtf8(image Path.text())))
My sys.version output:
2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3]
My OS:
bq. Ubuntu
Release 12.04 (precise) 32-bit