Skip to content

Instantly share code, notes, and snippets.

@SlyCodePanda
Last active April 12, 2019 07:55
Show Gist options
  • Save SlyCodePanda/040a0095a922990f1e655e3f64f0a1f9 to your computer and use it in GitHub Desktop.
Save SlyCodePanda/040a0095a922990f1e655e3f64f0a1f9 to your computer and use it in GitHub Desktop.
Stuff for PyQt quick creations
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
class Main(QtGui.QMainWindow):
def __init__(self, parent = None):
QtGui.QMainWindow.__init__(self,parent)
self.initUI()
def initUI(self):
# x and y coordinates on the screen, width, height
self.setGeometry(100,100,1030,800)
self.setWindowTitle("Writer")
def main():
app = QtGui.QApplication(sys.argv)
main = Main()
main.show()
sys.exit(app.exec_())
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment