remove minimum height for flatbutton
This commit is contained in:
parent
8eedb47a46
commit
0a89ee5d0a
|
@ -2,6 +2,7 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "flatbutton.h"
|
#include "flatbutton.h"
|
||||||
|
#include "iconbutton.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
|
@ -18,11 +19,22 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
FlatButton *flatButton = new FlatButton;
|
FlatButton *flatButton = new FlatButton;
|
||||||
flatButton->setText("My button");
|
flatButton->setText("My button");
|
||||||
|
|
||||||
|
QIcon icon("../qt-material-widgets/face.svg");
|
||||||
|
flatButton->setIcon(icon);
|
||||||
|
flatButton->setIconSize(QSize(64, 64));
|
||||||
|
|
||||||
layout->addWidget(flatButton);
|
layout->addWidget(flatButton);
|
||||||
flatButton->setMinimumHeight(40);
|
|
||||||
|
IconButton *iconButton = new IconButton(icon);
|
||||||
|
iconButton->setText("My button sis afdadsfadsf adsfasdf");
|
||||||
|
iconButton->setIconSize(QSize(32, 32));
|
||||||
|
//iconButton->setMaximumWidth(32);
|
||||||
|
|
||||||
|
layout->addWidget(iconButton);
|
||||||
|
|
||||||
QPushButton *button2 = new QPushButton("Test #2");
|
QPushButton *button2 = new QPushButton("Test #2");
|
||||||
layout->addWidget(button2);
|
layout->addWidget(button2);
|
||||||
|
button2->setIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|
Loading…
Reference in New Issue