I have
class View(QtWidgets.QLabel):
def __init__(self):
super(View,self).__init__()
self.cropLabel = QtWidgets.QLabel(self)
self.label = QtWidgets.QLabel(self)
self.ogpixmap = QtGui.QPixmap()
fileName = r'C:/Users/user11.HPO-SAMAT/Pictures/Lake.jpg'
image = QtGui.QImage(fileName)
self.pixmap = QtGui.QPixmap.fromImage(image)
self.label.setPixmap(self.pixmap)
self.label.adjustSize()
and then I call this class:
class Viewer(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
self.view = View()
self.scroller = QtWidgets.QScrollArea()
self.scroller.setWidget(self.view)
self.scroller.setWidgetResizable(True)
self.scroller.adjustSize()
But QScrollArea does not seem to work (noscrollbar though the image is visible and I can expand QMainWindows to see it entirely) What am I doing wrong ?