Results 1 to 5 of 5

Thread: Custom layout which allows child widgets to be moved and re-positioned

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2020
    Posts
    5
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question Custom layout which allows child widgets to be moved and re-positioned

    I am looking for a way to have a bunch of childs widgets(buttons), contained inside a main window widget/layout, to be able to move them around and re-position them interactively, as well as retaining their relative position to the main window scale .

    So far i could achieve something like this in a widget ui, without adding a layout (i can move any widgets etc), alto the issue is that when scaling the main UI window, all the buttons inside are staying "in place", and not moving relative to the window size, hence , falling outside of the window boarder.
    I know that adding a layout would allow the buttons to be in line with the widget scale, alto, it would also break the buttons positioning which is what i need.

    qt_01.png

    qt_02.png


    qt_03.png.

    So I would like instead to be able to , place a few button widgets inside the main window, in any position i want, and have them stay in the relative position as i rescale the main UI widget.

    After rescaling or moving the main window widget, i want to still be able to "edit" these buttons position/scale (by dragging them around ), and so on so forth.


    Any ideas on how i could achieve this or what would be the best approach to go about it ?
    Last edited by sQaT; 3rd December 2020 at 06:10.

Similar Threads

  1. Custom Container with predefined child widgets
    By nibedit in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2014, 08:50
  2. Replies: 0
    Last Post: 30th April 2012, 15:17
  3. List of child widgets includes layout
    By JovianGhost in forum Qt Programming
    Replies: 5
    Last Post: 11th May 2010, 03:22
  4. Replies: 5
    Last Post: 18th April 2010, 23:31
  5. Custom widgets in layout
    By Palmik in forum Newbie
    Replies: 11
    Last Post: 26th January 2009, 12:08

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.