Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#Code copied from:
#And later modified a bit.
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT
import sys
class MyMainWindow(QtGui.QMainWindow):
def resizeEvent(self,resizeEvent):
print self.width()
def main():
app = QtGui.QApplication(sys.argv)
mainWindow = MyMainWindow()
#Resize width and height
mainWindow.setWindowTitle('PyQT Detect QMainWindow Resize Event')
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.