Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Breakable Layout for Buttons-bar

    Mobile and Embedded
    3
    5
    773
    Loading More Posts
    • 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.
    • P
      peter-70 last edited by peter-70

      I'm Qt newbe. Now I'm trying to implement a UI with a buttons-bar. These UI breaks into new line, when the device shows the content vertically, or it shows the buttons in one or two lines, when the device shows the content horizontally.
      How can I do this? Grateful for your help!

      edit: So if the orientation is vertically, I have f.e. 2 buttons side by side and in the next line again 2 buttons side by side, in the next line again, and so on...
      Or I have 1 button, in the next line 1 button again, and so on...
      If the orientation is horizontally I have 4 buttons side by side, in the next line f.e. 3 buttons or what ever...

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Aren't you looking for QMainWindow ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • P
          peter-70 last edited by

          No, do you know f.e. Opera Browser? When you open a new tab, you have there some quick-link buttons. These buttons are in some kind of control, that allows to arrange the buttons automatically.
          When the place is wide enough, you have f.e. 3 or 4 button-columns and 2 button-rows.
          Otherwise you have f.e. 2 button-columns, and 4 button-rows.
          Do you read me?

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Then maybe the Flow Layout Example will be of interest.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • I
              ifreedom2018 last edited by

              edit: So if the orientation is vertically, I have f.e. 2 buttons side by side and in the next line again 2 buttons side by side, in the next line again, and so on...
              Or I have 1 button, in the next line 1 button again, and so on...
              If the orientation is horizontally I have 4 buttons side by side, in the next line f.e. 3 buttons or what ever...

              1 Reply Last reply Reply Quote 0
              • First post
                Last post