PDA

View Full Version : Layout problem



vijay anandh
12th July 2006, 23:00
Hi All

I want to Add one Button in Three different layouts. I Created One Qpushbutton and i have in my form three layouts. Each layout should have same button. Before i had created three different buttons for three layouts.. So one button should be coming in three layouts.

How Its possible. I have given statement following

QPushButton *button=new QPushButton("Done");

firstLayout->addWidget(button,0,Qt::AlignHCenter);
....
...
secondLayout->addWidget(button,0,Qt::AlignHCenter);


* The button is coming in only first layout and not in second and third layouts.

looking forward your reply
thanks and regards
vijay

munna
12th July 2006, 23:05
AFAIK you cannot do it. You will need to have three different buttons. The pressed signal of all the buttons should be connect to the same slot.

Why dont you add the button at the bottom ?