zlosynus
2nd August 2008, 09:13
Hi,
when I wrote following simple code:
QPushButton button("Button");
button.show();
it creates me window with button without any margins around.
But when I want to create window with two buttons, so I wrote following code:
QWidget mainwindow;
QHBoxLayout layout;
QPushButton button1("Button A");
QPushButton button2("Button B");
layout.addWidget(&button1);
layout.addWidget(&button2);
mainwindow.setLayout(&layout);
mainwindow.show();
But it creates me margin around both buttons and I really dont want it at all.
when I wrote following simple code:
QPushButton button("Button");
button.show();
it creates me window with button without any margins around.
But when I want to create window with two buttons, so I wrote following code:
QWidget mainwindow;
QHBoxLayout layout;
QPushButton button1("Button A");
QPushButton button2("Button B");
layout.addWidget(&button1);
layout.addWidget(&button2);
mainwindow.setLayout(&layout);
mainwindow.show();
But it creates me margin around both buttons and I really dont want it at all.