feat:创建一个空的项目CustomStyle
这个里面什么都没有只是一个单纯的空文件项目
This commit is contained in:
parent
947ec48610
commit
a1e7d4f3f7
15
QtCustomStyleEx/Examples.cpp
Normal file
15
QtCustomStyleEx/Examples.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Examples.h"
|
||||
#include "ui_Examples.h"
|
||||
|
||||
Examples::Examples(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::Examples)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowTitle(QObject::tr("创建自定义的CustomStyle风格"));
|
||||
}
|
||||
|
||||
Examples::~Examples()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
QtCustomStyleEx/Examples.h
Normal file
22
QtCustomStyleEx/Examples.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef EXAMPLES_H
|
||||
#define EXAMPLES_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class Examples;
|
||||
}
|
||||
|
||||
class Examples : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Examples(QWidget *parent = nullptr);
|
||||
~Examples();
|
||||
|
||||
private:
|
||||
Ui::Examples *ui;
|
||||
};
|
||||
|
||||
#endif // EXAMPLES_H
|
20
QtCustomStyleEx/Examples.ui
Normal file
20
QtCustomStyleEx/Examples.ui
Normal file
@ -0,0 +1,20 @@
|
||||
<ui version="4.0">
|
||||
<class>Examples</class>
|
||||
<widget class="QWidget" name="Examples" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Examples</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
BIN
QtCustomStyleEx/QT_win_32x32.ico
Normal file
BIN
QtCustomStyleEx/QT_win_32x32.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
42
QtCustomStyleEx/QtCustomStyleEx.pro
Normal file
42
QtCustomStyleEx/QtCustomStyleEx.pro
Normal file
@ -0,0 +1,42 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2019-08-26T19:16:23
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = QtCustomStyleEx
|
||||
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 \
|
||||
Examples.cpp
|
||||
|
||||
HEADERS += \
|
||||
Examples.h
|
||||
|
||||
FORMS += \
|
||||
Examples.ui
|
||||
|
||||
RC_ICONS += QT_win_32x32.ico
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
11
QtCustomStyleEx/main.cpp
Normal file
11
QtCustomStyleEx/main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "Examples.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
Examples w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
Loading…
Reference in New Issue
Block a user