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 custom UI resizable
Forum Update on Monday, May 27th 2025

Making a custom UI resizable

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 221 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.
  • T Offline
    T Offline
    TimNorton
    wrote on 1 Aug 2022, 17:08 last edited by
    #1

    I have a UI with manually placed controls that I would like to make resizable. From what I've looked up the way to do this is to use layouts, but when I try to create my setup using layouts I can't get the alignments and locations I want since it "snaps" the controls into places I don't want. Is there a way to create this UI setup I have and make it resizable so that all the controls scale with the window size?

    q1.JPG q2.JPG

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Aug 2022, 18:13 last edited by
      #2

      Hi,

      If you don't want to use layouts, then you have to reimplement the resizeEvent method of your main widget and do there the sizing and placing the way you want it.

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

      T 1 Reply Last reply 2 Aug 2022, 15:51
      1
      • S SGaist
        1 Aug 2022, 18:13

        Hi,

        If you don't want to use layouts, then you have to reimplement the resizeEvent method of your main widget and do there the sizing and placing the way you want it.

        T Offline
        T Offline
        TimNorton
        wrote on 2 Aug 2022, 15:51 last edited by
        #3

        @SGaist Ok, thanks. I'll give that a try.

        1 Reply Last reply
        0

        1/3

        1 Aug 2022, 17:08

        • Login

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