79312589

Date: 2024-12-27 19:01:34
Score: 1
Natty:
Report link

I found the answer to my own question elsewhere. In the slot function within the QMainWindow object you would, after defining the QWidget object, write the code:

self.widget.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)

Applying an integer as a parameter to the self.widget.setWindowmodality(2) function worked in PyQt5 but is deprecated in PyQt6 and PySide6 therefore should be avoided as both ways work in PyQt5

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Matthew Bendyna