PyQt is not showing Button if i set window to showMaximize()
If i set a self.setGeometry(50, 50, 500, 300) then the Button is showing perfectly Facing issue at showMaximized()
import sys
from PyQt4 import QtGui, QtCore
class Window(QtGui.QMainWindow):
def __init__(self):
super(Window, self).__init__()
self.showMaximized()
self.setWindowTitle("PyQT tuts!")
self.setWindowIcon(QtGui.QIcon('pythonlogo.png'))
self.home()
def home(self):
btn = QtGui.QPushButton("Quit", self)
btn.clicked.connect(QtCore.QCoreApplication.instance().quit)
btn.resize(100, 100)
btn.move(100, 100)
self.show()
def run():
app = QtGui.QApplication(sys.argv)
GUI = Window()
sys.exit(app.exec_())
run()
Any Help Would be appreciated ,
I need to place the Button at center of my Window .