mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-06 17:25:24 +08:00
qt 6.6.0 clean
This commit is contained in:
23
tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected
vendored
Normal file
23
tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(ui_project LANGUAGES CXX)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
||||
qt_standard_project_setup()
|
||||
|
||||
qt_add_executable(ui_project
|
||||
main.cpp
|
||||
widget.cpp
|
||||
widget.h
|
||||
)
|
||||
|
||||
target_sources(ui_project
|
||||
PRIVATE
|
||||
widget.ui
|
||||
)
|
||||
|
||||
target_link_libraries(ui_project
|
||||
PRIVATE
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
11
tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp
vendored
Normal file
11
tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
#include "widget.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
Widget w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
15
tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp
vendored
Normal file
15
tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
#include "widget.h"
|
||||
#include "ui_widget.h"
|
||||
|
||||
Widget::Widget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::Widget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
Widget::~Widget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
21
tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h
vendored
Normal file
21
tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef WIDGET_H
|
||||
#define WIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class Widget; }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class Widget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Widget(QWidget *parent = nullptr);
|
||||
~Widget();
|
||||
|
||||
private:
|
||||
Ui::Widget *ui;
|
||||
};
|
||||
#endif // WIDGET_H
|
32
tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui
vendored
Normal file
32
tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Widget</class>
|
||||
<widget class="QWidget" name="Widget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Widget</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>6</y>
|
||||
<width>781</width>
|
||||
<height>581</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Now I have CMakeLists.txt. Thanks!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user