diff --git a/QtMyStyleEx/ExMyStyle.cpp b/QtMyStyleEx/ExMyStyle.cpp new file mode 100644 index 0000000..6b4f769 --- /dev/null +++ b/QtMyStyleEx/ExMyStyle.cpp @@ -0,0 +1,29 @@ +/* + * Author: touwoyimuli + * blogs: https://touwoyimuli.github.io/ + * + * Copyright 2019 touwoyimuli + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ExMyStyle.h" + +ExMyStyle::ExMyStyle(QWidget *parent) + : QDialog(parent) +{ +} + +ExMyStyle::~ExMyStyle() +{ + +} diff --git a/QtMyStyleEx/ExMyStyle.h b/QtMyStyleEx/ExMyStyle.h new file mode 100644 index 0000000..9a1ebd7 --- /dev/null +++ b/QtMyStyleEx/ExMyStyle.h @@ -0,0 +1,33 @@ +/* + * Author: touwoyimuli + * blogs: https://touwoyimuli.github.io/ + * + * Copyright 2019 touwoyimuli + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef EXMYSTYLE_H +#define EXMYSTYLE_H + +#include + +class ExMyStyle : public QDialog +{ + Q_OBJECT + +public: + ExMyStyle(QWidget *parent = 0); + ~ExMyStyle(); +}; + +#endif // EXMYSTYLE_H diff --git a/QtMyStyleEx/QtMyStyleEx.pro b/QtMyStyleEx/QtMyStyleEx.pro new file mode 100644 index 0000000..571e466 --- /dev/null +++ b/QtMyStyleEx/QtMyStyleEx.pro @@ -0,0 +1,37 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2020-01-07T20:08:35 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = QtMyStyleEx +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 \ + ExMyStyle.cpp + +HEADERS += \ + ExMyStyle.h + +# 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/QtMyStyleEx/main.cpp b/QtMyStyleEx/main.cpp new file mode 100644 index 0000000..1cef55b --- /dev/null +++ b/QtMyStyleEx/main.cpp @@ -0,0 +1,29 @@ +/* + * Author: touwoyimuli + * blogs: https://touwoyimuli.github.io/ + * + * Copyright 2019 touwoyimuli + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ExMyStyle.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + ExMyStyle w; + w.show(); + + return a.exec(); +}