Hi,
when I wrote following simple code:
button.show();
QPushButton button("Button");
button.show();
To copy to clipboard, switch view to plain text mode
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:
layout.addWidget(&button1);
layout.addWidget(&button2);
mainwindow.setLayout(&layout);
mainwindow.show();
QWidget mainwindow;
QHBoxLayout layout;
QPushButton button1("Button A");
QPushButton button2("Button B");
layout.addWidget(&button1);
layout.addWidget(&button2);
mainwindow.setLayout(&layout);
mainwindow.show();
To copy to clipboard, switch view to plain text mode
But it creates me margin around both buttons and I really dont want it at all.
Bookmarks