Align image to top so that pixel tracking is accurate.

This commit is contained in:
Stefan van der Walt
2009-11-07 08:44:02 +02:00
parent da8ff125c4
commit 775ff607cf
+2
View File
@@ -15,6 +15,7 @@ else:
try:
from PyQt4.QtGui import (QApplication, QMainWindow, QImage, QPixmap,
QLabel, QWidget, QVBoxLayout)
from PyQt4.QtCore import Qt
except ImportError:
print 'PyQT4 libraries not installed. Plugin not loaded.'
@@ -30,6 +31,7 @@ else:
self.img = QImage(arr.data, arr.shape[1], arr.shape[0],
arr.strides[0], QImage.Format_RGB888)
self.pm = QPixmap.fromImage(self.img)
self.setAlignment(Qt.AlignTop)
self.setPixmap(self.pm)