our_app_3.py

Ikuo Yamaga, 2019-02-01 03:34 AM

Download (549 Bytes)

 
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3

    
4
from PyQt5.QtWidgets import QApplication
5
from qgis.core import QgsApplication
6

    
7
from ourmainwindow_3 import OurMainWindow
8

    
9
app = QApplication([])
10
# set up QGIS
11
##QgsApplication.setPrefixPath("/Users/gsherman/apps/QGIS.app/Contents/MacOS", True)
12
QgsApplication.setPrefixPath("/Applications/QGIS3.app/Contents/MacOS", True)
13
QgsApplication.initQgis()
14

    
15
# set the main window and show it
16
mw = OurMainWindow()
17
mw.show()
18

    
19
app.exec_()
20

    
21
# "delete" our main window
22
mw = None
23
# clean up QGIS
24
QgsApplication.exitQgis()