View Full Version : Arrange Widgets in QSplitter
vinodpaul
7th September 2012, 08:22
Hi, I need to place three widgets into a QSplitter.
The problem i face is that i need to align first two widgets horizontally and to that i want to align the third widget vertically. I could not find a solution , all I was able to do was to align all three either vertically or horizontally.
Thanks
Vinod
stampede
7th September 2012, 08:55
You can add first two widgets to a horizontal layout and align this layout with third widget in a vertical splitter.
vinodpaul
7th September 2012, 09:09
But QSplitter accepts only QWidgets right? so how will i add a layout into the splitter
stampede
7th September 2012, 10:17
If you use designer, open the right click menu while selecting both layout and third widget, there will be an option to arrange in a splitter.
If you want to do that from the code, create a fourth widget and add the layout to it. Then arrange fourth and third widgets in a splitter. Code generated from designer form looks like that, try to create a test form and generate the code (using 'uic') for reference.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.