removeing deprecated pyqt methods

This commit is contained in:
Adolfo Gómez García 2022-08-14 21:57:28 +02:00
parent d84977dee0
commit de9bbfc896

View File

@ -38,7 +38,7 @@ import webbrowser
import threading import threading
import typing import typing
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtWidgets, QtGui
from PyQt5.QtCore import QSettings from PyQt5.QtCore import QSettings
from uds.rest import RestApi, RetryException, InvalidVersion, UDSException from uds.rest import RestApi, RetryException, InvalidVersion, UDSException
@ -79,10 +79,10 @@ class UDSClient(QtWidgets.QMainWindow):
self.ui.info.setText('Initializing...') self.ui.info.setText('Initializing...')
screen = QtWidgets.QDesktopWidget().screenGeometry() screen_geometry = QtGui.QGuiApplication.primaryScreen().geometry()
mysize = self.geometry() mysize = self.geometry()
hpos = (screen.width() - mysize.width()) // 2 hpos = (screen_geometry.width() - mysize.width()) // 2
vpos = (screen.height() - mysize.height() - mysize.height()) // 2 vpos = (screen_geometry.height() - mysize.height() - mysize.height()) // 2
self.move(hpos, vpos) self.move(hpos, vpos)
self.animTimer = QtCore.QTimer() self.animTimer = QtCore.QTimer()