daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # always seem to need this
  2. import sys
  3.  
  4. # This gets the Qt stuff
  5. import PyQt5
  6. from PyQt5.QtWidgets import *
  7.  
  8. # This is our window from QtCreator
  9. import mainwindow_auto
  10.  
  11. # create class for our Raspberry Pi GUI
  12. class MainWindow(QMainWindow, mainwindow_auto.Ui_MainWindow):
  13.  # access variables inside of the UI's file
  14.  def __init__(self):
  15.  super(self.__class__, self).__init__()
  16.  self.setupUi(self) # gets defined in the UI file
  17.  
  18. # I feel better having one of these
  19. def main():
  20.  # a new app instance
  21.  app = QApplication(sys.argv)
  22.  form = MainWindow()
  23.  form.show()
  24.  # without this, the script exits immediately.
  25.  sys.exit(app.exec_())
  26.  
  27. # python bit to figure how who started This
  28. if __name__ == "__main__":
  29.  main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top