fix PyQgsFloatingWidget test on Qt6

This commit is contained in:
Alexander Bruy 2025-05-17 11:31:55 +01:00 committed by Nyall Dawson
parent 6b43049104
commit d0f97ef833
2 changed files with 6 additions and 5 deletions

View File

@ -38,7 +38,6 @@ PyQgsAuthenticationSystem
PyQgsDelimitedTextProvider
PyQgsEditWidgets
PyQgsElevationProfileCanvas
PyQgsFloatingWidget
PyQgsLayoutHtml
PyQgsMapBoxGlStyleConverter
PyQgsNetworkAccessManager

View File

@ -10,6 +10,7 @@ __author__ = "Nyall Dawson"
__date__ = "26/04/2016"
__copyright__ = "Copyright 2016, The QGIS Project"
from qgis.PyQt.QtCore import Qt
from qgis.PyQt.QtWidgets import QGridLayout, QWidget
from qgis.gui import QgsFloatingWidget
import unittest
@ -38,7 +39,7 @@ class TestQgsFloatingWidget(QgisTestCase):
gl.setRowStretch(2, 1)
# 103 = WA_DontShowOnScreen (not available in PyQt)
main_frame.setAttribute(103)
main_frame.setAttribute(Qt.WidgetAttribute(103))
main_frame.show()
fw = QgsFloatingWidget(main_frame)
@ -174,7 +175,7 @@ class TestQgsFloatingWidget(QgisTestCase):
gl.setRowStretch(2, 1)
# 103 = WA_DontShowOnScreen (not available in PyQt)
main_frame.setAttribute(103)
main_frame.setAttribute(Qt.WidgetAttribute(103))
main_frame.show()
fw = QgsFloatingWidget(main_frame)
@ -218,7 +219,7 @@ class TestQgsFloatingWidget(QgisTestCase):
gl.setRowStretch(2, 1)
# 103 = WA_DontShowOnScreen (not available in PyQt)
main_frame.setAttribute(103)
main_frame.setAttribute(Qt.WidgetAttribute(103))
main_frame.show()
fw = QgsFloatingWidget(main_frame)
@ -256,7 +257,8 @@ class TestQgsFloatingWidget(QgisTestCase):
gl.setRowStretch(1, 0)
gl.setRowStretch(2, 1)
main_frame.setAttribute(103)
# 103 = WA_DontShowOnScreen (not available in PyQt)
main_frame.setAttribute(Qt.WidgetAttribute(103))
main_frame.show()
fw = QgsFloatingWidget(main_frame)