Results 1 to 3 of 3

Thread: Dynamic Item Location

  1. #1
    Join Date
    Sep 2014
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Dynamic Item Location

    Hey Guys,

    I was wondering if anyone had any tips on how to get an item to move location based on window size.

    I have everything setup where the items are next to each other horizontally in the UI editor, but I need to stack them vertically when the window is made smaller.

    Best Regards,
    David

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Dynamic Item Location

    What kind of item are we talking about?
    Which UI technology?
    How do you do the layouting right now?

    Cheers,
    _

  3. #3
    Join Date
    Sep 2014
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Dynamic Item Location

    I currently have a QGridLayout, and two QListWidgets inside the layout.
    In the current setup, they are shown horizontally, but I need the two QListWidgets to stack vertically when the window is made smaller.

    Thanks


    Added after 1 6 minutes:


    Okay, I think I've figured it out.

    I'm just using the ui->gridLayout->addWidget method to redraw the location of the two widgets.

    Best Regards,
    David
    Last edited by DavidLinSuperstar; 12th November 2014 at 21:15.

Similar Threads

  1. How to set the location of an item in a scene
    By slewrate in forum Qt Programming
    Replies: 1
    Last Post: 17th May 2012, 09:38
  2. Replies: 0
    Last Post: 29th March 2012, 20:56
  3. Replies: 1
    Last Post: 20th January 2011, 18:17
  4. Replies: 2
    Last Post: 19th October 2010, 07:33
  5. [solved]QListView dynamic item height
    By kernel_panic in forum Qt Programming
    Replies: 8
    Last Post: 17th March 2009, 15:05

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.