From 6c268362a7ac8fe39bc08081b05e7192856a1e79 Mon Sep 17 00:00:00 2001 From: xmuli Date: Mon, 8 Mar 2021 15:28:39 +0800 Subject: [PATCH] feat: Create an empty Qt Windows project --- CustomQch/CustomQch.pro | 40 +++++++++++++++++++++++++++++++++++++++ CustomQch/ifmetwindow.cpp | 14 ++++++++++++++ CustomQch/ifmetwindow.h | 22 +++++++++++++++++++++ CustomQch/ifmetwindow.ui | 24 +++++++++++++++++++++++ CustomQch/main.cpp | 11 +++++++++++ 5 files changed, 111 insertions(+) create mode 100644 CustomQch/CustomQch.pro create mode 100644 CustomQch/ifmetwindow.cpp create mode 100644 CustomQch/ifmetwindow.h create mode 100644 CustomQch/ifmetwindow.ui create mode 100644 CustomQch/main.cpp diff --git a/CustomQch/CustomQch.pro b/CustomQch/CustomQch.pro new file mode 100644 index 0000000..3907e8f --- /dev/null +++ b/CustomQch/CustomQch.pro @@ -0,0 +1,40 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2021-03-08T15:28:01 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = CustomQch +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +CONFIG += c++11 + +SOURCES += \ + main.cpp \ + ifmetwindow.cpp + +HEADERS += \ + ifmetwindow.h + +FORMS += \ + ifmetwindow.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/CustomQch/ifmetwindow.cpp b/CustomQch/ifmetwindow.cpp new file mode 100644 index 0000000..88ea3f3 --- /dev/null +++ b/CustomQch/ifmetwindow.cpp @@ -0,0 +1,14 @@ +#include "ifmetwindow.h" +#include "ui_ifmetwindow.h" + +IfmetWindow::IfmetWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IfmetWindow) +{ + ui->setupUi(this); +} + +IfmetWindow::~IfmetWindow() +{ + delete ui; +} diff --git a/CustomQch/ifmetwindow.h b/CustomQch/ifmetwindow.h new file mode 100644 index 0000000..5cf10bb --- /dev/null +++ b/CustomQch/ifmetwindow.h @@ -0,0 +1,22 @@ +#ifndef IFMETWINDOW_H +#define IFMETWINDOW_H + +#include + +namespace Ui { +class IfmetWindow; +} + +class IfmetWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IfmetWindow(QWidget *parent = nullptr); + ~IfmetWindow(); + +private: + Ui::IfmetWindow *ui; +}; + +#endif // IFMETWINDOW_H diff --git a/CustomQch/ifmetwindow.ui b/CustomQch/ifmetwindow.ui new file mode 100644 index 0000000..da6c9a3 --- /dev/null +++ b/CustomQch/ifmetwindow.ui @@ -0,0 +1,24 @@ + + IfmetWindow + + + + 0 + 0 + 400 + 300 + + + + IfmetWindow + + + + + + + + + + + diff --git a/CustomQch/main.cpp b/CustomQch/main.cpp new file mode 100644 index 0000000..92fce48 --- /dev/null +++ b/CustomQch/main.cpp @@ -0,0 +1,11 @@ +#include "ifmetwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + IfmetWindow w; + w.show(); + + return a.exec(); +}