Пример #1
0
 def resizeEvent(self, qResizeEvent):
     '''
     During resizes, the Pixmaps need to be reloaded and scaled to keep aspect ratio.
     Remember to disable "scaledContent" otherwise scaled() would have no effect !
     '''
     if self.currentPath is not None:
         self.setPicturePath(self.currentPath)
     return QLabel.resizeEvent(self, qResizeEvent)
Пример #2
0
 def resizeEvent(self, qResizeEvent):
     '''
     During resizes, the Pixmaps need to be reloaded and scaled to keep aspect ratio.
     Remember to disable "scaledContent" otherwise scaled() would have no effect !
     '''
     if self.currentPath is not None:
         self.setPicturePath(self.currentPath)
     return QLabel.resizeEvent(self, qResizeEvent)
 def resizeEvent(self, qResizeEvent):
     '''
     During resizes, the Pixmaps need to be reloaded and scaled to keep aspect ratio.
     Remember to disable "scaledContent" otherwise scaled() would have no effect !
     '''
     if self.pixmap() is not None:
         self.setPixmap(self.pixmap().scaled(self.width(), self.height(), Qt.KeepAspectRatio,
                                               Qt.SmoothTransformation))
     return QLabel.resizeEvent(self, qResizeEvent)
Пример #4
0
 def resizeEvent(self, qResizeEvent):
     '''
     During resizes, the Pixmaps need to be reloaded and scaled to keep aspect ratio.
     Remember to disable "scaledContent" otherwise scaled() would have no effect !
     '''
     if self.pixmap() is not None:
         self.setPixmap(self.pixmap().scaled(self.width(), self.height(),
                                             Qt.KeepAspectRatio,
                                             Qt.SmoothTransformation))
     return QLabel.resizeEvent(self, qResizeEvent)
 def resizeEvent(self, qResizeEvent):
     if not qResizeEvent.oldSize() == QSize(-1, -1) and self.text() != "":
         self.adjustFont()
     return QLabel.resizeEvent(self, qResizeEvent)
Пример #6
0
 def resizeEvent(self, qResizeEvent):
     if not qResizeEvent.oldSize() == QSize(-1, -1) and self.text() != "":
         self.adjustFont()
     return QLabel.resizeEvent(self, qResizeEvent)