File: Qt.py

package info (click to toggle)
kuttypy 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,896 kB
  • sloc: python: 58,651; javascript: 14,686; xml: 5,767; ansic: 2,716; makefile: 453; asm: 254; sh: 48
file content (25 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## 'Qt' is a local module; it is intended mainly to cover up the differences
## between PyQt4 and PyQt5.
import os

ENVIRON = os.environ['CSMCA_QT_LIB']

if ENVIRON=='PyQt5':
	print('PyQt5 imported')
	from PyQt5 import QtGui,QtCore,QtWidgets
	try: from PyQt5 import QtSvg
	except: pass
	try:
		#from PyQt5.QtWebEngineWidgets import QWebEngineView as QWebView
		from PyQt5.QtWebKitWidgets import QWebView# , QWebPage
	except:
		QWebView = None
elif ENVIRON == 'PyQt4':
	print('PyQt4 imported')
	from PyQt4 import QtGui,QtCore
	from PyQt4 import QtGui as QtWidgets
	#try:
	#	from PyQt4.QtWebKitWidgets import QWebView# , QWebPage
	#except:
	#	print('webview unavailable')