Now with a picture-button that does a thing
This commit is contained in:
parent
7f6d0c7484
commit
e5c336223c
4 changed files with 22 additions and 0 deletions
|
|
@ -6,6 +6,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
myButton = new QPushButton(this);
|
||||
myButton->setIcon(QIcon(":/res/icon128.png"));
|
||||
myButton->setIconSize(QSize(128, 128));
|
||||
myButton->resize(QSize(128, 128));
|
||||
connect(myButton, &QAbstractButton::clicked, this, &MainWindow::on_actionExit_triggered);
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
|
|
@ -28,6 +34,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
delete myButton;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionExit_triggered()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue