mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
uic widget-plugins: do not crash if QGIS not installed
This commit is contained in:
parent
0ff49856e6
commit
acd574db2e
@ -23,6 +23,9 @@ in custom widgets to the correct QGIS python packages.
|
||||
It is copied on installation in /pythonX/dist-packages/PyQt4/uic/widget-plugins/
|
||||
"""
|
||||
|
||||
# solution with CW_FILTER not fully working due to include of other files
|
||||
# (e.g. for flags defined in other source files)
|
||||
|
||||
# pluginType = CW_FILTER
|
||||
# def getFilter():
|
||||
# import qgis.gui
|
||||
@ -41,9 +44,11 @@ It is copied on installation in /pythonX/dist-packages/PyQt4/uic/widget-plugins/
|
||||
# return _QGISfilter
|
||||
|
||||
|
||||
|
||||
pluginType = MODULE
|
||||
def moduleInformation():
|
||||
try:
|
||||
import qgis.gui
|
||||
return "qgis.gui", dir(qgis.gui)
|
||||
except ImportError:
|
||||
return "", []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user