comparison feedworm.py @ 251:3ce39af93e77 pyqt5

Update to PyQt5
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 22 Oct 2017 03:40:44 +0200
parents 7c719c4f5655
children
comparison
equal deleted inserted replaced
250:f715378371ab 251:3ce39af93e77
4 import sip 4 import sip
5 sip.setapi('QString', 2) 5 sip.setapi('QString', 2)
6 sip.setapi('QVariant', 2) 6 sip.setapi('QVariant', 2)
7 7
8 from MainWindow import MainWindow 8 from MainWindow import MainWindow
9 from PyQt4 import QtGui 9 from PyQt5 import QtGui
10 from PyQt4.QtNetwork import QNetworkProxy 10 from PyQt5.QtWidgets import QApplication
11 from PyQt5.QtNetwork import QNetworkProxy
11 import BackendFactory 12 import BackendFactory
12 import logging 13 import logging
13 import sys 14 import sys
14 import warnings 15 import warnings
15 16
33 34
34 backend = BackendFactory.createBackend() 35 backend = BackendFactory.createBackend()
35 preferences = backend.preferences() 36 preferences = backend.preferences()
36 setupProxy(preferences) 37 setupProxy(preferences)
37 38
38 app = QtGui.QApplication(sys.argv) 39 app = QApplication(sys.argv)
39 mainWindow = MainWindow(backend) 40 mainWindow = MainWindow(backend)
40 41
41 maximized = preferences.startMaximized() 42 maximized = preferences.startMaximized()
42 if maximized: 43 if maximized:
43 mainWindow.showMaximized() 44 mainWindow.showMaximized()