Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def sth():
import sys
app = QtWidgets.QApplication(sys.argv)
window = MapperUI()
sys.exit(app.exec_())
def eventFilter(self, source, event):
if source is self.label and event.type() == QtCore.QEvent.Resize:
self.label.setPixmap(
self.pixmap.scaled(self.label.size(), QtCore.Qt.KeepAspectRatio)
)
return super(MapperUI, self).eventFilter(source, event)