diff --git a/realcentroid.py b/realcentroid.py index 28ebcaa..15ba138 100644 --- a/realcentroid.py +++ b/realcentroid.py @@ -24,7 +24,7 @@ import os.path from PyQt5.QtCore import QSettings, QTranslator, qVersion, QCoreApplication, Qt from PyQt5.QtGui import QIcon -from PyQt5.QtWidgets import QAction +from PyQt5.QtWidgets import QAction, QMessageBox from qgis.core import QgsVectorFileWriter, QgsWkbTypes, QgsFeature, \ QgsMessageLog, QgsVectorLayer, QgsProject diff --git a/realcentroid_dialog.py b/realcentroid_dialog.py index d59d437..0a28bba 100644 --- a/realcentroid_dialog.py +++ b/realcentroid_dialog.py @@ -90,12 +90,12 @@ def browse(self): def ok(self): """ check widgets """ if len(self.layerBox.currentText()) == 0: - QtGui.QMessageBox.warning(self, "Realcentroid", \ + QtWidgets.QMessageBox.warning(self, "Realcentroid", \ QtGui.QApplication.translate("RealCentroid", \ "No polygon layer selected", None)) return if len(self.pointEdit.text()) == 0: - QtGui.QMessageBox.warning(self, "Realcentroid", \ + QtWidgets.QMessageBox.warning(self, "Realcentroid", \ QtGui.QApplication.translate("RealCentroid", \ "No point layer given", None)) return