mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-03 07:45:30 +08:00
qt 6.5.1 original
This commit is contained in:
18
tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
Normal file
18
tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project("test(needsquoting)dirname")
|
||||
|
||||
find_package(Qt6Widgets REQUIRED)
|
||||
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
qt_wrap_cpp(moc_files mywidget.h)
|
||||
qt_wrap_ui(ui_files mywidget.ui)
|
||||
|
||||
add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files})
|
||||
target_link_libraries(mywidget Qt::Widgets)
|
18
tests/auto/cmake/test(needsquoting)dirname/mywidget.cpp
Normal file
18
tests/auto/cmake/test(needsquoting)dirname/mywidget.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "mywidget.h"
|
||||
#include "ui_mywidget.h"
|
||||
|
||||
MyWidget::MyWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
emit someSignal();
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
MyWidget myWidget;
|
||||
return 0;
|
||||
}
|
27
tests/auto/cmake/test(needsquoting)dirname/mywidget.h
Normal file
27
tests/auto/cmake/test(needsquoting)dirname/mywidget.h
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#ifndef MYWIDGET_H
|
||||
#define MYWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MyWidget;
|
||||
}
|
||||
|
||||
class MyWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MyWidget(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void someSignal();
|
||||
|
||||
private:
|
||||
Ui::MyWidget *ui;
|
||||
};
|
||||
|
||||
#endif
|
34
tests/auto/cmake/test(needsquoting)dirname/mywidget.ui
Normal file
34
tests/auto/cmake/test(needsquoting)dirname/mywidget.ui
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user