summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_qt_add_ui_common/UicIncBuild_sameFileDiffFolder/src/mainwindow.cpp
blob: d4302325fbbb68e8941735a33244aadbf707b2f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include "mainwindow.h"

#include <QVBoxLayout>

#include "../../../../src/ui_files/ui_mainwindow.h"
#include "widget1.h"

MainWindow::MainWindow(QWidget* parent)
  : QMainWindow(parent)
  , ui(new Ui::MainWindow)
{
  ui->setupUi(this);
  auto layout = new QVBoxLayout;
  layout->addWidget(new Widget1);

  QWidget* w = new QWidget(this);
  w->setLayout(layout);

  setCentralWidget(w);
}

MainWindow::~MainWindow()
{
  delete ui;
}