Solved QgsProjectionSelectionWidget select no projection issue in PyQt5
-
I am trying to override the original (invalid projection) value in the mqgsprojectionselectionwidget to no projection selected, but I don't know what functions would be needed! I am using pyqt5 to display plugin in QGIS 3.0
-
Hi
I think its better to ask in QGIS forum.
QGIS is not part of Qt so you have to have huge luck that someone knows the answer here. -
Okay, thanks for the reply
-
So I managed to figure it out using the c++ source file for QgsProjectionSelectionWidget(https://qgis.org/api/qgsprojectionselectionwidget_8cpp_source.html)
mQgsProjectionSelectionWidget.setOptionVisible(mQgsProjectionSelectionWidget.CrsNotSet,True)
#Sets whether a predefined CRS option should be shown in the widget.
mQgsProjectionSelectionWidget.setNotSetText('Use default projection')
#Sets the text to show for the not set option. Note that this option is not shown by default and must be set visible by calling setOptionVisible().
-
Thank you for reporting back.