Skip to content

Commit

Permalink
Manually translated boilerplate main.cpp to PyQt5-friendly main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-random committed Oct 16, 2017
1 parent 15dcfd5 commit 0afc467
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions qtquick2/main.py
@@ -0,0 +1,21 @@
import sys

from PyQt5.QtCore import QCoreApplication, Qt, QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml import QQmlApplicationEngine

def main():
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)

global app
app = QGuiApplication(sys.argv)

engine = QQmlApplicationEngine()
engine.load(QUrl('main.qml'))
if not engine.rootObjects():
return -1

app.exec_()

if __name__ == '__main__':
main()

0 comments on commit 0afc467

Please sign in to comment.