From 318e9cb6d39e63e0d241cf22c4c604df994fcb91 Mon Sep 17 00:00:00 2001 From: touwoyimuli Date: Sun, 1 Sep 2019 17:15:19 +0800 Subject: [PATCH] fix:README.md --- QtQlistWidgetEx/ExQListWidget.cpp | 14 ++++++++++ QtQlistWidgetEx/ExQListWidget.h | 22 +++++++++++++++ QtQlistWidgetEx/ExQListWidget.ui | 24 +++++++++++++++++ QtQlistWidgetEx/Examples.cpp | 14 ++++++++++ QtQlistWidgetEx/Examples.h | 22 +++++++++++++++ QtQlistWidgetEx/Examples.ui | 20 ++++++++++++++ QtQlistWidgetEx/QtQlistWidgetEx.pro | 40 ++++++++++++++++++++++++++++ QtQlistWidgetEx/images/List.png | Bin 0 -> 306 bytes QtQlistWidgetEx/images/TREE.png | Bin 0 -> 324 bytes QtQlistWidgetEx/images/Table.png | Bin 0 -> 461 bytes QtQlistWidgetEx/images/add.png | Bin 0 -> 369 bytes QtQlistWidgetEx/images/clear.png | Bin 0 -> 584 bytes QtQlistWidgetEx/images/delete.png | Bin 0 -> 594 bytes QtQlistWidgetEx/images/init.png | Bin 0 -> 913 bytes QtQlistWidgetEx/images/insert.png | Bin 0 -> 374 bytes QtQlistWidgetEx/main.cpp | 11 ++++++++ QtQlistWidgetEx/resources.qrc | 2 ++ README.md | 19 ++++++++++--- 18 files changed, 184 insertions(+), 4 deletions(-) create mode 100644 QtQlistWidgetEx/ExQListWidget.cpp create mode 100644 QtQlistWidgetEx/ExQListWidget.h create mode 100644 QtQlistWidgetEx/ExQListWidget.ui create mode 100644 QtQlistWidgetEx/Examples.cpp create mode 100644 QtQlistWidgetEx/Examples.h create mode 100644 QtQlistWidgetEx/Examples.ui create mode 100644 QtQlistWidgetEx/QtQlistWidgetEx.pro create mode 100644 QtQlistWidgetEx/images/List.png create mode 100644 QtQlistWidgetEx/images/TREE.png create mode 100644 QtQlistWidgetEx/images/Table.png create mode 100644 QtQlistWidgetEx/images/add.png create mode 100644 QtQlistWidgetEx/images/clear.png create mode 100644 QtQlistWidgetEx/images/delete.png create mode 100644 QtQlistWidgetEx/images/init.png create mode 100644 QtQlistWidgetEx/images/insert.png create mode 100644 QtQlistWidgetEx/main.cpp create mode 100644 QtQlistWidgetEx/resources.qrc 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 0000000000000000000000000000000000000000..adbe379ee760cb19aa37f7a76a01840bc8289a98 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJpPnv`ArbCxry24!ItsMz|Ibt+ zG}lG9WYJ@`DA~2z89N$wG_*+XV4PZP(bUq>=d($5<{RyvB=euUD~GJHRQyklyIPyQB6{B}>@>gIe(g{4%Ue zybsn12&6rAv|;_Ui}R{nW1-PQt*?2^+==I8DzvmKR0C#kPH%86{a1KtW+s0iP375OC5YJa?p zdlsiJr?vfmMZs;e*gx7#xbC|`kEM(0A=e&8KNBrQy+x8%z(8Q|boFyt=akR{006da AL;wH) literal 0 HcmV?d00001 diff --git a/QtQlistWidgetEx/images/TREE.png b/QtQlistWidgetEx/images/TREE.png new file mode 100644 index 0000000000000000000000000000000000000000..156696216140cbb17d9e468d95f423444ca4161e GIT binary patch literal 324 zcmV-K0lWT*P)0lpRor$ zG5uv`4 zef-U!Lo)|3{QI{bpG&JRer34w;SaI)GmsSm_{ssgM8TkT0MTKOMIq6Na8MV;BcmK( zVq$W@71vQmK1}%h`@aFPX@RV4h|h4EmIK82il*hjkZ=Goj>M&gU^zgE;l$`2bpQaJ Wm(U^PMECsw0000ZA- literal 0 HcmV?d00001 diff --git a/QtQlistWidgetEx/images/Table.png b/QtQlistWidgetEx/images/Table.png new file mode 100644 index 0000000000000000000000000000000000000000..eb8627d0bbcbeee31c07bea592cf964bca382147 GIT binary patch literal 461 zcmV;;0W$uHP)v0004$NkllIU7!~(aCPp+t@uqCUZ7XEeT*3n!%bn$Znk~bAH$$vDGcCcL?W00So)g za5ajR-T+)q^m0=M5h#OPj?>!o@}WIIQ@GM<)=!4*>G{D8$enoo_T~B7-cJc*bog36 zEG+;v8#R|8bAC`HdFMbTJ$uJwQU-0lW708c8JL%kx$8;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;_u literal 0 HcmV?d00001 diff --git a/QtQlistWidgetEx/images/init.png b/QtQlistWidgetEx/images/init.png new file mode 100644 index 0000000000000000000000000000000000000000..c4e2012963b5041e837c7311e6cc905bd6b0038b GIT binary patch literal 913 zcmV;C18)3@P)KZ-b>tFPMP6rn3-?SXiomfEfP+MH{_+=L#W} z#RUXK5MyIuV}h7#_U*_lyT{AsZg;&?vgO^po!@=)&Ad6#AwM|e{M0vq*7^~En-zaR zi<#H0wa>yZ+;PwJ4d8j+vQlcf41k%(0bGzcX5LmxEj1dAR(7s$fU?By_w{;xd}wHB zO%!A19c%4WrbH<~yGoOj8j^z{k4P-1q(GM06FvjCf(6 z0-3X!c}ooDnx$gmB+RWj5w)Tyn$MKT%0NW(K@fx;0I7AYR{KgsyHONP=B4`^fGpN& z)q6n@Nd2iNfbaXai0B~^tp-8xsGo%SGonPTR{JTXFvd(30ywmZG(`ZO=iLA>N<_bn zF;9wOwbm_}13?fZY8NRWNiS!C`IpYl&Q6Sujy`4PI)F~;n3(~DdwY8;o12^8^5=Zt z-}m0W08&$Z2XK^`EfIYN@PnC85YcG>L(JT6x7%m(5CZ|oJh0Y=N~u>$sY}fK(ONs} z8dTtvQty>gCuPcI{hcY%H-PW^bs~Dp%&!4lDQiuw^$visIF47F&1T2MeFLP1N$SVU z1mFV^o$J*lp6A_BO5Km+_)D|dJXN4T(rpI@QJypfNK|l)^&*O*Dgn4JN`JuyGyfu@ zi*oJCWEAtY+wBWwgQzbBvO}^50+7|JvmvFE@ue|lsheMVnLCSh6-d^l?4B+%pOi!? z<;QXSDGbAnqF5Pd%)Drfk^VpMbO6#V_bCx|?(V7`Fi4!ckjULFgM_WMGhrCY?)KlG zeJfd}Lb_D0lWz%=6ow-A}Er1?l(kyH>Thap7L?nE3|G0aVp^scs=atJU1Bl3+Ib z{`}X#U$U}cGSh_yEPyp&4U|20MfGZP6RM%#p~I`Cd)b5qHT2tb*axsf2#f)!$<%ei z@Khj*K=Lp_@MQ$xZ0sLM#7h$Gv@ga4_8@qz6yW6cd3$3X-Xp>m2}F@ zyj2bm|E;?5JraF_Ya)0Nkwc>Z3B+XTG6)7Fy6N6?1j@b<1Nq51A3f~~WB?$^9wK + +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** 的两个图标,方便抬手之间,表示点个赞,手有余香