Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1015

Subclassing resizeEvent on QMdiSubWindow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.3
    • PySide
    • None
    • Windows 10 64x
    • Windows

    Description

      The goal was to send the resizeEvent from the QMdiSubWindow to another QWidget inside of it to handle the size of elements inside that QWidget, but if we subclass the resizeEvent on a QMdiSubWindow, the limits of that window breaks, not letting you resize it bigger than it was or having actual visible resizable limits anymore.

      Attached minimum reproducible demo, run:

      python main_logic.py
      

      Update: Uploaded a video so you can see the behaviour on my computer.

      Update 2: This workaround seems to fix it... but a simple event.accept() should just work.

          def resizeEvent(self, event):
              """Send the resize event to the widget"""
              self.main_widget.custom_resize()
              QtWidgets.QMdiSubWindow.resizeEvent(self, event)
       

      Attachments

        1. Example.flv
          1.83 MB
        2. pyside-1015.zip
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            saelyth Alejandro Gutierrez Almansa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes