Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. setGeometry has no Effect on MDISubWindow
Forum Update on Monday, May 27th 2025

setGeometry has no Effect on MDISubWindow

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 239 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ArunBm
    wrote on last edited by
    #1

    hi
    Below is my Code
    SetGeometry has no Effect on mdiSubWindow
    Kindly enlighten me

    class navigationWidget(QtWidgets.QMdiSubWindow):
        def __init__(self, mdiArea , cQRect):
            super(navigationWidget, self).__init__()
            self.cQRect =cQRect
            self.setWidget(QtWidgets.QListView())
            self.setWindowTitle("Options")         
            self.setGeometry(self.cQRect)
            mdiArea.addSubWindow(self)
            mdiArea.show()
    
    JonBJ 1 Reply Last reply
    0
    • A ArunBm

      hi
      Below is my Code
      SetGeometry has no Effect on mdiSubWindow
      Kindly enlighten me

      class navigationWidget(QtWidgets.QMdiSubWindow):
          def __init__(self, mdiArea , cQRect):
              super(navigationWidget, self).__init__()
              self.cQRect =cQRect
              self.setWidget(QtWidgets.QListView())
              self.setWindowTitle("Options")         
              self.setGeometry(self.cQRect)
              mdiArea.addSubWindow(self)
              mdiArea.show()
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @ArunBm said in setGeometry has no Effect on MDISubWindow:
      Something vaguely similar without solution reported years ago: https://forum.qt.io/topic/28518/qmdisubwindow-does-not-go-to-position-used-in-setgeometry

      One thing you might try: move the setGeometry() call to after the addSubWindow() and even after the show(), does that make it work?

      Otherwise I don't know, maybe you could hook onto resize events to see if you can find what is going on.

      1 Reply Last reply
      3
      • A Offline
        A Offline
        ArunBm
        wrote on last edited by ArunBm
        #3

        Thanks @JonB ...I added self.setGeometry(self.cQRect) after Show() and it worked

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved