Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. rowCount does not change after removing one line widgets
Qt 6.12 LTS is out! See what's new in the release blog

rowCount does not change after removing one line widgets

Scheduled Pinned Locked Moved Solved Qt for Python
3 Posts 2 Posters 706 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.
  • feiyuhuahuoF Offline
    feiyuhuahuoF Offline
    feiyuhuahuo
    wrote on last edited by feiyuhuahuo
    #1

    I have such a QGroupBox, its layout is QGridlayout.
    2c570acd-2fa5-4ac4-9f97-ffe09aecb248-image.png
    The rowCount is 5 now in above image.
    After I remove the final line of buttons, it shows correctly but the rowCount is still 5.
    96760923-37d4-41b6-80b9-904ba1145bd0-屏幕截图 2022-11-14 170633.png

    Is there any operation I missed?

    jsulmJ 1 Reply Last reply
    0
    • feiyuhuahuoF feiyuhuahuo

      I have such a QGroupBox, its layout is QGridlayout.
      2c570acd-2fa5-4ac4-9f97-ffe09aecb248-image.png
      The rowCount is 5 now in above image.
      After I remove the final line of buttons, it shows correctly but the rowCount is still 5.
      96760923-37d4-41b6-80b9-904ba1145bd0-屏幕截图 2022-11-14 170633.png

      Is there any operation I missed?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @feiyuhuahuo You only remove the buttons, but not the row in the layout, right? Then the behaviour is correct.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • feiyuhuahuoF Offline
        feiyuhuahuoF Offline
        feiyuhuahuo
        wrote on last edited by
        #3

        https://forum.qt.io/topic/121308/how-to-get-row-and-columns-count-in-qgridlayout
        Seems it's impossible to remove a certain row in a QGridlayout.

        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
        • Unsolved