Exemple #1
0
    def raiseWindow(cls, widget: QWidget):
        if not widget: return
        window = widget.window()
        """ :type: QWidget"""

        if window is cls.mainWindow:
            cls.mainWindow.raiseWindow()
        else:
            window.raise_()
            window.activateWindow()
    def mapIdentification(self):
        if self.layer is None or self.mapTool is None or self.canvas is None:
            return

        self.mapTool.setLayer(self.layer)
        self.canvas.setMapTool(self.mapTool)

        self.windowWidget = QWidget.window(self)
        self.canvas.window().raise_()
        self.canvas.activateWindow()
        self.canvas.setFocus()

        self.mapTool.featureIdentified.connect(self.mapToolFeatureIdentified)
        self.mapTool.deactivated.connect(self.mapToolDeactivated)