PDA

View Full Version : Layout positioning problem.



Tomasz
14th September 2010, 09:35
Hello!

I've got very irritating problem with my layout. I need to put it below button which is on top of the window:



QPushButton *quitButton = new QPushButton(this);
quitButton->setGeometry(QRect(0,0,25,25));
quitButton->move(207,2);

connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));

QHBoxLayout *oknoLayout = new QHBoxLayout(this);

Wykres *wykres = new Wykres(this);
oknoLayout->addWidget(wykres);

oknoLayout->setGeometry(QRect(QPoint(0,40),QPoint(0,320)));


Layout with widget inside is on top of a button. I need button to be where it is now. QHBoxLayout don't have move(), so any ideas how can I move my layout lower?

thanks in advance
best regards
Tomasz

Ginsengelf
14th September 2010, 09:42
Hi, put button and layout into a QVBoxLayout or use a QGridLayout.

Ginsengelf