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. How to approach this multi pane resizable parts
Forum Updated to NodeBB v4.3 + New Features

How to approach this multi pane resizable parts

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 351 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.
  • S Offline
    S Offline
    Simmania
    wrote on last edited by
    #1

    Hi,
    I'm not new to Qt, but it is about 10 years ago I worked with it! Now I want to create some application and I'm not sure how to approach this.
    My application has a main window with some standard menu stuff and the remaining should consist of panes that can be switched on anf off. I do not want to define all these panes inside the main window (using the GUI editor). That is getting to complex. So I can define the separate panes with code, or can I use the GUI editor on just some separate pane? The borders between the panes in the main window need to be movable.
    My questions are:

    • should I use Frames or Widgets for the panes?
    • I can use layouts to arrange the panes in the main window, but how can I make them runtime resizable?
    • Can I define a pane separately using the GUI editor? How do I set this up?
      Any advise is welcome!
    jsulmJ 1 Reply Last reply
    0
    • S Simmania

      Hi,
      I'm not new to Qt, but it is about 10 years ago I worked with it! Now I want to create some application and I'm not sure how to approach this.
      My application has a main window with some standard menu stuff and the remaining should consist of panes that can be switched on anf off. I do not want to define all these panes inside the main window (using the GUI editor). That is getting to complex. So I can define the separate panes with code, or can I use the GUI editor on just some separate pane? The borders between the panes in the main window need to be movable.
      My questions are:

      • should I use Frames or Widgets for the panes?
      • I can use layouts to arrange the panes in the main window, but how can I make them runtime resizable?
      • Can I define a pane separately using the GUI editor? How do I set this up?
        Any advise is welcome!
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Simmania said in How to approach this multi pane resizable parts:

      or can I use the GUI editor

      Yes, you can. Design your custom widgets in GUI editor, then instanciate them and put them where you want to have them.

      "should I use Frames or Widgets for the panes?" - depends. Do you need shapes around your panes?

      "but how can I make them runtime resizable?" - using https://doc.qt.io/qt-5/qsplitter.html

      "Can I define a pane separately using the GUI editor? How do I set this up?" - yes, see above and https://doc.qt.io/qt-5/designer-using-custom-widgets.html

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

      1 Reply Last reply
      2
      • S Offline
        S Offline
        Simmania
        wrote on last edited by
        #3

        Thx, that helped me a lot. Yes I like to have a frame, So if that is the main difference, I can use QFrame.

        I have my basis working now. Thx.

        One question though: I use this QSplitter to be able to rezide the Widgets (Frames actually). But I also need to be able to switch them off programatically. Such that they dissapear and do not use screen space anymore. But the enable function just grays it out. Is there a function to make them (temporary) dissapear?
        Or is the only way to do that to dynamically add/remove items to the QSplitter?

        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