Plugin PyQt5 and PyQt6 compatible & CenRa_Copie bug fix
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import logging
|
||||
import os
|
||||
from PyQt5.QtCore import QSettings,QPointF
|
||||
from collections import namedtuple
|
||||
from enum import Enum
|
||||
from functools import partial
|
||||
@@ -44,7 +43,7 @@ from qgis.core import (
|
||||
from qgis.PyQt.QtCore import QLocale, QUrl, QDateTime, Qt
|
||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon, QColor, QFont, QMovie
|
||||
from qgis.PyQt.QtPrintSupport import QPrinter
|
||||
from qgis.PyQt.QtWebKitWidgets import QWebPage
|
||||
#from qgis.PyQt.QtWebKitWidgets import QWebPage
|
||||
from qgis.PyQt.QtWidgets import (
|
||||
QDialog,
|
||||
QAction,
|
||||
@@ -57,8 +56,14 @@ from qgis.PyQt.QtWidgets import (
|
||||
QTableWidgetItem,
|
||||
QVBoxLayout,
|
||||
)
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
try:
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt5.QtCore import QSettings,QPointF
|
||||
except:
|
||||
from PyQt6 import QtGui
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
from PyQt6.QtCore import QSettings,QPointF
|
||||
from qgis.PyQt.QtXml import QDomDocument
|
||||
from qgis.utils import iface
|
||||
import glob
|
||||
@@ -158,7 +163,7 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
|
||||
self.verticalScrollBar.setValue(self.frame.y())
|
||||
def mousePressEvent(self, event):
|
||||
if self.tableWidget.currentItem() != None:
|
||||
QApplication.setOverrideCursor(Qt.OpenHandCursor)
|
||||
QApplication.setOverrideCursor(Qt.CursorShape(18))
|
||||
global lastPos
|
||||
lastPos = {'x':event.pos().x(),'y':event.pos().y()}
|
||||
|
||||
@@ -167,13 +172,13 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
#if event.modifiers() & Qt.ControlModifier:
|
||||
if event.key() == Qt.Key_Up:
|
||||
if event.key() == Qt.Key(0x01000015):
|
||||
self.verticalSlider.setValue(self.spinBox_2.value()+1)
|
||||
if event.key() == Qt.Key_Down:
|
||||
if event.key() == Qt.Key(0x01000013):
|
||||
self.verticalSlider.setValue(self.spinBox_2.value()-1)
|
||||
if event.key() == Qt.Key_Right:
|
||||
if event.key() == Qt.Key(0x01000014):
|
||||
self.horizontalSlider.setValue(self.spinBox.value()+1)
|
||||
if event.key() == Qt.Key_Left:
|
||||
if event.key() == Qt.Key(0x01000012):
|
||||
self.horizontalSlider.setValue(self.spinBox.value()-1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user