| 1 |
// Copyright (C) 2023 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#include "mainwindow.h" |
| 5 |
|
| 6 |
#include <QVBoxLayout> |
| 7 |
|
| 8 |
#include "src/ui_mainwindow.h" |
| 9 |
#include "widget1.h" |
| 10 |
|
| 11 |
MainWindow::MainWindow(QWidget* parent) |
| 12 |
: QMainWindow(parent) |
| 13 |
, ui(new Ui::MainWindow) |
| 14 |
{ |
| 15 |
ui->setupUi(this); |
| 16 |
auto layout = new QVBoxLayout; |
| 17 |
layout->addWidget(new Widget1); |
| 18 |
|
| 19 |
QWidget* w = new QWidget(this); |
| 20 |
w->setLayout(layout); |
| 21 |
|
| 22 |
setCentralWidget(w); |
| 23 |
} |
| 24 |
|
| 25 |
MainWindow::~MainWindow() |
| 26 |
{ |
| 27 |
delete ui; |
| 28 |
} |