I get when I move the App this Warning:
C:\Qt\Login_Test\main.py:48: DeprecationWarning: Function: 'globalPos() const' is marked as deprecated, please check the documentation for more information.self.dragPos = event.globalPos()
C:\Qt\Login_Test\main.py:43: DeprecationWarning: Function: 'globalPos() const' is marked as deprecated, please check the documentation for more information.self.move(self.pos() + event.globalPos() - self.dragPos)
C:\Qt\Login_Test\main.py:44: DeprecationWarning: Function: 'globalPos() const' is marked as deprecated, please check the documentation for more information.self.dragPos = event.globalPos()
I used this code:
self.remove_title()self.ui.appname_label.mouseMoveEvent = self.move_windowdef remove_title(self):self.setWindowFlag(QtCore.Qt.FramelessWindowHint)self.setAttribute(QtCore.Qt.WA_TranslucentBackground)self.shadow = QGraphicsDropShadowEffect(self)self.shadow.setBlurRadius(20)self.shadow.setXOffset(0)self.shadow.setYOffset(0)self.shadow.setColor(QColor(0, 0, 0, 250))self.ui.frame.setGraphicsEffect(self.shadow)def move_window(self, event):if event.buttons() == Qt.LeftButton:self.move(self.pos() + event.globalPos() - self.dragPos)self.dragPos = event.globalPos()event.accept()def mousePressEvent(self, event):self.dragPos = event.globalPos()
Is there a way to skip this warning? It works but this warning is annoying.