mess around with layout

This commit is contained in:
laserpants 2016-03-19 11:27:32 +03:00
parent f1882265dd
commit dd3a473fff
1 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,6 @@
#include <QVBoxLayout>
#include <QPushButton>
#include <QLabel>
#include "mainwindow.h"
#include "flatbutton.h"
#include "iconbutton.h"
@ -25,12 +26,22 @@ MainWindow::MainWindow(QWidget *parent)
layout->addWidget(flatButton);
// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
QHBoxLayout *hLayout = new QHBoxLayout;
QLabel *label = new QLabel("Hello");
label->setMaximumHeight(32);
IconButton *iconButton = new IconButton(icon);
iconButton->setText("My button sis afdadsfadsf adsfasdf");
iconButton->setIconSize(QSize(32, 32));
//iconButton->setMaximumWidth(32);
layout->addWidget(iconButton);
hLayout->addWidget(iconButton);
hLayout->addWidget(label);
layout->addLayout(hLayout);
// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
QPushButton *button2 = new QPushButton("Test #2");
layout->addWidget(button2);