PDA

View Full Version : QStackWidget layoutspacing



killerwookie99
14th August 2008, 22:22
I had originally had my widgets all lined up etc. Well I wanted to be able to switch out widgets with the click of a button, so hey why not use a QStackWidget? Well when I put my QTreeView in this it has new offset my listview compared to the others and I have no way to say stackWidget->setLayoutSpacing(0) or something similar so it's literally transparent?

Is there a way to overlap widgets without using QStackWidget? Or is there a way to set spacing correctly, i.e. 0.

jpn
14th August 2008, 22:26
Perhaps:

stackedWidget->layout()->setMargin(0);

killerwookie99
14th August 2008, 22:38
That didn't work, it may just be the qwidgetstack nature? Is there any other way to overlay widgets?