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. Making a qttreeview resize with the qdialog
Forum Updated to NodeBB v4.3 + New Features

Making a qttreeview resize with the qdialog

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 493 Views 2 Watching
  • 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.
  • T Offline
    T Offline
    tony67
    wrote on last edited by
    #1

    Hi All,
    went back to working on some old code. On one dialog I have a single treeview. However try as I might I can't get the tree to expand with the dialog. I also have several other dialogs in the software with treeviews and these work fine. The only difference I can see is in the expanding ones "geometry" is greyed out on the treeview. But I can't workout what I've done to achieve this.
    Can anyone advise what I need to do to get this to work? Thanks

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Since geometry is grey out, it sounds like you used a layout for the working ones.
      If the one not working has free/non grey "geometry ", its not in layout
      and that is the reason.

      Normally, a layout is all that is needed. (to follow parent)

      To make one that follow, its simply
      Create a new Dialog with UI.
      Click on UI file
      Drag TreeView to Dialog UI
      Right click somewhere on Dialog UI
      Select Layout -> Layout vertically
      Then TreeView should follow.

      T 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi
        Since geometry is grey out, it sounds like you used a layout for the working ones.
        If the one not working has free/non grey "geometry ", its not in layout
        and that is the reason.

        Normally, a layout is all that is needed. (to follow parent)

        To make one that follow, its simply
        Create a new Dialog with UI.
        Click on UI file
        Drag TreeView to Dialog UI
        Right click somewhere on Dialog UI
        Select Layout -> Layout vertically
        Then TreeView should follow.

        T Offline
        T Offline
        tony67
        wrote on last edited by
        #3

        @mrjj Thankyou it was layout. I searched every parameter but didn't notice that had a no entry sign

        1 Reply Last reply
        1

        • Login

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