PDA

View Full Version : Dynamic Item Location



DavidLinSuperstar
12th November 2014, 16:53
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

anda_skoa
12th November 2014, 18:31
What kind of item are we talking about?
Which UI technology?
How do you do the layouting right now?

Cheers,
_

DavidLinSuperstar
12th November 2014, 20:15
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