diff --git a/QtQlistWidgetEx/ExQListWidget.cpp b/QtQlistWidgetEx/ExQListWidget.cpp new file mode 100644 index 0000000..b7d9fb9 --- /dev/null +++ b/QtQlistWidgetEx/ExQListWidget.cpp @@ -0,0 +1,14 @@ +#include "ExQListWidget.h" +#include "ui_ExQListWidget.h" + +ExQListWidget::ExQListWidget(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::ExQListWidget) +{ + ui->setupUi(this); +} + +ExQListWidget::~ExQListWidget() +{ + delete ui; +} diff --git a/QtQlistWidgetEx/ExQListWidget.h b/QtQlistWidgetEx/ExQListWidget.h new file mode 100644 index 0000000..30c5f5b --- /dev/null +++ b/QtQlistWidgetEx/ExQListWidget.h @@ -0,0 +1,22 @@ +#ifndef EXQLISTWIDGET_H +#define EXQLISTWIDGET_H + +#include + +namespace Ui { +class ExQListWidget; +} + +class ExQListWidget : public QMainWindow +{ + Q_OBJECT + +public: + explicit ExQListWidget(QWidget *parent = nullptr); + ~ExQListWidget(); + +private: + Ui::ExQListWidget *ui; +}; + +#endif // EXQLISTWIDGET_H diff --git a/QtQlistWidgetEx/ExQListWidget.ui b/QtQlistWidgetEx/ExQListWidget.ui new file mode 100644 index 0000000..25d4157 --- /dev/null +++ b/QtQlistWidgetEx/ExQListWidget.ui @@ -0,0 +1,24 @@ + + ExQListWidget + + + + 0 + 0 + 400 + 300 + + + + ExQListWidget + + + + + + + + + + + diff --git a/QtQlistWidgetEx/Examples.cpp b/QtQlistWidgetEx/Examples.cpp new file mode 100644 index 0000000..ca01efa --- /dev/null +++ b/QtQlistWidgetEx/Examples.cpp @@ -0,0 +1,14 @@ +#include "Examples.h" +#include "ui_Examples.h" + +Examples::Examples(QWidget *parent) : + QWidget(parent), + ui(new Ui::Examples) +{ + ui->setupUi(this); +} + +Examples::~Examples() +{ + delete ui; +} diff --git a/QtQlistWidgetEx/Examples.h b/QtQlistWidgetEx/Examples.h new file mode 100644 index 0000000..8fe4eaa --- /dev/null +++ b/QtQlistWidgetEx/Examples.h @@ -0,0 +1,22 @@ +#ifndef EXAMPLES_H +#define EXAMPLES_H + +#include + +namespace Ui { +class Examples; +} + +class Examples : public QWidget +{ + Q_OBJECT + +public: + explicit Examples(QWidget *parent = nullptr); + ~Examples(); + +private: + Ui::Examples *ui; +}; + +#endif // EXAMPLES_H diff --git a/QtQlistWidgetEx/Examples.ui b/QtQlistWidgetEx/Examples.ui new file mode 100644 index 0000000..b6774ff --- /dev/null +++ b/QtQlistWidgetEx/Examples.ui @@ -0,0 +1,20 @@ + + Examples + + + + 0 + 0 + 400 + 300 + + + + Examples + + + + + + + diff --git a/QtQlistWidgetEx/QtQlistWidgetEx.pro b/QtQlistWidgetEx/QtQlistWidgetEx.pro new file mode 100644 index 0000000..40a4374 --- /dev/null +++ b/QtQlistWidgetEx/QtQlistWidgetEx.pro @@ -0,0 +1,40 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2019-08-30T19:36:43 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = QtQlistWidgetEx +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 + +# 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/QtQlistWidgetEx/images/List.png b/QtQlistWidgetEx/images/List.png new file mode 100644 index 0000000..adbe379 Binary files /dev/null and b/QtQlistWidgetEx/images/List.png differ diff --git a/QtQlistWidgetEx/images/TREE.png b/QtQlistWidgetEx/images/TREE.png new file mode 100644 index 0000000..1566962 Binary files /dev/null and b/QtQlistWidgetEx/images/TREE.png differ diff --git a/QtQlistWidgetEx/images/Table.png b/QtQlistWidgetEx/images/Table.png new file mode 100644 index 0000000..eb8627d Binary files /dev/null and b/QtQlistWidgetEx/images/Table.png differ diff --git a/QtQlistWidgetEx/images/add.png b/QtQlistWidgetEx/images/add.png new file mode 100644 index 0000000..3c0c2fd Binary files /dev/null and b/QtQlistWidgetEx/images/add.png differ diff --git a/QtQlistWidgetEx/images/clear.png b/QtQlistWidgetEx/images/clear.png new file mode 100644 index 0000000..20cdc2a Binary files /dev/null and b/QtQlistWidgetEx/images/clear.png differ diff --git a/QtQlistWidgetEx/images/delete.png b/QtQlistWidgetEx/images/delete.png new file mode 100644 index 0000000..6e419f4 Binary files /dev/null and b/QtQlistWidgetEx/images/delete.png differ diff --git a/QtQlistWidgetEx/images/init.png b/QtQlistWidgetEx/images/init.png new file mode 100644 index 0000000..c4e2012 Binary files /dev/null and b/QtQlistWidgetEx/images/init.png differ diff --git a/QtQlistWidgetEx/images/insert.png b/QtQlistWidgetEx/images/insert.png new file mode 100644 index 0000000..767e22b Binary files /dev/null and b/QtQlistWidgetEx/images/insert.png differ diff --git a/QtQlistWidgetEx/main.cpp b/QtQlistWidgetEx/main.cpp new file mode 100644 index 0000000..5c200aa --- /dev/null +++ b/QtQlistWidgetEx/main.cpp @@ -0,0 +1,11 @@ +#include "Examples.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + Examples w; + w.show(); + + return a.exec(); +} diff --git a/QtQlistWidgetEx/resources.qrc b/QtQlistWidgetEx/resources.qrc new file mode 100644 index 0000000..90f4a83 --- /dev/null +++ b/QtQlistWidgetEx/resources.qrc @@ -0,0 +1,2 @@ + + diff --git a/README.md b/README.md index d6806ef..6a58538 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,15 @@ ## 补充部分:补充较杂的知识点 -#### 乱码相关: +### 使用Qt Creator的小技巧: + +- [小技巧:Design设计师里,无法拖拽action到toolbar里](https://blog.csdn.net/qq_33154343/article/details/100168170) + +- [小技巧:设置`QToolBox`的每一页page的使用单独的布局(`QTabWidget`同理)](https://mp.csdn.net/mdeditor/100185025#) + +
+ +### 乱码相关: - [ 输出乱码原因:古文码、口字码、符号码、问号码、棍拷码](https://blog.csdn.net/qq_33154343/article/details/99617767) - [qt5 中文乱码解决](https://blog.csdn.net/qq_33154343/article/details/95344312) @@ -90,9 +98,12 @@
-## Qt推倒重学系列--总目录[【github.io】](https://touwoyimuli.github.io/): +## 同步github.io博客: -**github.io的同步总目录**:[WiKi](https://github.com/touwoyimuli/QtExamples/wiki/Qt%E6%8E%A8%E5%80%92%E9%87%8D%E5%AD%A6%E7%B3%BB%E5%88%97--%E6%80%BB%E7%9B%AE%E5%BD%95%E3%80%90github.io%E3%80%91) +- github.io的同步总目录:[WiKi](https://github.com/touwoyimuli/QtExamples/wiki/Qt%E6%8E%A8%E5%80%92%E9%87%8D%E5%AD%A6%E7%B3%BB%E5%88%97--%E6%80%BB%E7%9B%AE%E5%BD%95%E3%80%90github.io%E3%80%91) + + +- Qt Creator使用小技巧:[WiKi](https://github.com/touwoyimuli/QtExamples/wiki/Qt%E4%BD%BF%E7%94%A8%E7%9A%84%E4%B8%80%E4%B8%8B%E5%B0%8F%E6%8A%80%E5%B7%A7)
@@ -104,7 +115,7 @@ ## 互助 -若是帮助到了你,可以点击该项目的的 **Star** 和 **Fork** 的两个图标,方便抬手之间,表示点个赞,手有余香 +若是帮助到了你,或者觉得有用,可以点击该项目的的 **Star** 和 **Fork** 的两个图标,方便抬手之间,表示点个赞,手有余香