更新代码

master
feiyangqingyun 2021-11-26 20:21:49 +08:00
parent 6520cf6ddb
commit 6a9eb131b3
9 changed files with 115 additions and 98 deletions

View File

@ -1,4 +1,4 @@
#### 一、特别说明 #### 一、特别说明
1. 可以选择打开QWidgetDemo.pro一次性编译所有的也可以到目录下打开pro编译。 1. 可以选择打开QWidgetDemo.pro一次性编译所有的也可以到目录下打开pro编译。
2. 如果发现有些子项目没有加载请打开对应目录下的.pro仔细看里面的注释。 2. 如果发现有些子项目没有加载请打开对应目录下的.pro仔细看里面的注释。
3. 编译好的可执行文件在源码同级目录下的bin目录。 3. 编译好的可执行文件在源码同级目录下的bin目录。

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -54,7 +54,7 @@ void frmBase64Helper::on_btnImageToBase64_clicked()
double elapsed = (double)time.elapsed(); double elapsed = (double)time.elapsed();
#endif #endif
QString strTime = QString::number(elapsed, 'f', 3); QString strTime = QString::number(elapsed, 'f', 3);
qDebug() << QString("用时 %1 毫秒").arg(strTime); ui->labInfo->setText(QString("图片转base64 用时 %1 毫秒").arg(strTime));
} }
void frmBase64Helper::on_btnBase64ToImage_clicked() void frmBase64Helper::on_btnBase64ToImage_clicked()
@ -77,7 +77,7 @@ void frmBase64Helper::on_btnBase64ToImage_clicked()
double elapsed = (double)time.elapsed(); double elapsed = (double)time.elapsed();
#endif #endif
QString strTime = QString::number(elapsed, 'f', 3); QString strTime = QString::number(elapsed, 'f', 3);
qDebug() << QString("用时 %1 毫秒").arg(strTime); ui->labInfo->setText(QString("base64转图片 用时 %1 毫秒").arg(strTime));
} }
void frmBase64Helper::on_btnTextToBase64_clicked() void frmBase64Helper::on_btnTextToBase64_clicked()

View File

@ -14,52 +14,6 @@
<string>Widget</string> <string>Widget</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLineEdit" name="txtFile">
<property name="text">
<string>E:/myFile/美女图片/2.jpg</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="btnOpen">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>打开文件</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="btnImageToBase64">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>图片转base64</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="btnBase64ToImage">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>base64转图片</string>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLineEdit" name="txtText"> <widget class="QLineEdit" name="txtText">
<property name="text"> <property name="text">
@ -80,33 +34,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="3" column="0" colspan="4">
<widget class="QPushButton" name="btnTextToBase64">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>文字转base64</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="btnBase64ToText">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>base64转文字</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="4">
<widget class="QLabel" name="labImage"> <widget class="QLabel" name="labImage">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -128,12 +56,108 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="4"> <item row="0" column="2">
<widget class="QPushButton" name="btnImageToBase64">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>图片转base64</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="btnBase64ToText">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>base64转文字</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="btnOpen">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>打开文件</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLineEdit" name="txtFile">
<property name="text">
<string>E:/myFile/美女图片/2.jpg</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<widget class="QTextEdit" name="txtBase64"/> <widget class="QTextEdit" name="txtBase64"/>
</item> </item>
<item row="1" column="2">
<widget class="QPushButton" name="btnBase64ToImage">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>base64转图片</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="btnTextToBase64">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>文字转base64</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labInfo">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>txtFile</tabstop>
<tabstop>txtText</tabstop>
<tabstop>btnOpen</tabstop>
<tabstop>btnClear</tabstop>
<tabstop>btnImageToBase64</tabstop>
<tabstop>btnBase64ToImage</tabstop>
<tabstop>btnTextToBase64</tabstop>
<tabstop>btnBase64ToText</tabstop>
<tabstop>txtBase64</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -24,7 +24,7 @@ int main(int argc, char *argv[])
#endif #endif
frmEmailTool w; frmEmailTool w;
w.setWindowTitle("串口调试助手 V2021 (QQ: 517216493 WX: feiyangqingyun)"); w.setWindowTitle("邮件发送工具 V2021 (QQ: 517216493 WX: feiyangqingyun)");
w.show(); w.show();
return a.exec(); return a.exec();

View File

@ -459,29 +459,28 @@ background:#444444;
QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{ QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{
color:#DCDCDC; color:#DCDCDC;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); background:#383838;
} }
QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView{ QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView,QHeaderView::section,QTableCornerButton:section{
color:#DCDCDC; color:#DCDCDC;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); background:#525252;
} }
QTableView::item,QListView::item,QTreeView::item{ QTableView::item,QListView::item,QTreeView::item{
padding:1px; padding:1px;
margin:0px; margin:0px;
border:0px;
} }
QHeaderView::section,QTableCornerButton:section{ QHeaderView::section,QTableCornerButton:section{
padding:3px; padding:3px;
margin:0px; margin:0px;
color:#DCDCDC;
border:1px solid #242424; border:1px solid #242424;
border-left-width:0px; border-left-width:0px;
border-right-width:1px; border-right-width:1px;
border-top-width:0px; border-top-width:0px;
border-bottom-width:1px; border-bottom-width:1px;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252);
} }
QTabBar::tab{ QTabBar::tab{

View File

@ -459,12 +459,12 @@ background:#FFFFFF;
QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{ QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{
color:#57595B; color:#57595B;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #E4E4E4,stop:1 #E4E4E4); background:#E4E4E4;
} }
QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView{ QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView,QHeaderView::section,QTableCornerButton:section{
color:#57595B; color:#57595B;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F6F6F6,stop:1 #F6F6F6); background:#F6F6F6;
} }
QTableView::item,QListView::item,QTreeView::item{ QTableView::item,QListView::item,QTreeView::item{
@ -476,13 +476,11 @@ border:0px;
QHeaderView::section,QTableCornerButton:section{ QHeaderView::section,QTableCornerButton:section{
padding:3px; padding:3px;
margin:0px; margin:0px;
color:#57595B;
border:1px solid #B6B6B6; border:1px solid #B6B6B6;
border-left-width:0px; border-left-width:0px;
border-right-width:1px; border-right-width:1px;
border-top-width:0px; border-top-width:0px;
border-bottom-width:1px; border-bottom-width:1px;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F6F6F6,stop:1 #F6F6F6);
} }
QTabBar::tab{ QTabBar::tab{

View File

@ -459,12 +459,12 @@ background:#EAF7FF;
QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{ QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{
color:#386487; color:#386487;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #DEF0FE,stop:1 #C0DEF6); background:#C0DEF6;
} }
QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView{ QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView,QHeaderView::section,QTableCornerButton:section{
color:#386487; color:#386487;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F2F9FF,stop:1 #DAEFFF); background:#DAEFFF;
} }
QTableView::item,QListView::item,QTreeView::item{ QTableView::item,QListView::item,QTreeView::item{
@ -476,13 +476,11 @@ border:0px;
QHeaderView::section,QTableCornerButton:section{ QHeaderView::section,QTableCornerButton:section{
padding:3px; padding:3px;
margin:0px; margin:0px;
color:#386487;
border:1px solid #C0DCF2; border:1px solid #C0DCF2;
border-left-width:0px; border-left-width:0px;
border-right-width:1px; border-right-width:1px;
border-top-width:0px; border-top-width:0px;
border-bottom-width:1px; border-bottom-width:1px;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F2F9FF,stop:1 #DAEFFF);
} }
QTabBar::tab{ QTabBar::tab{

View File

@ -459,12 +459,12 @@ background:#444444;
QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{ QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{
color:#DCDCDC; color:#DCDCDC;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); background:#383838;
} }
QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView{ QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView,QHeaderView::section,QTableCornerButton:section{
color:#DCDCDC; color:#DCDCDC;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); background:#525252;
} }
QTableView::item,QListView::item,QTreeView::item{ QTableView::item,QListView::item,QTreeView::item{
@ -476,13 +476,11 @@ border:0px;
QHeaderView::section,QTableCornerButton:section{ QHeaderView::section,QTableCornerButton:section{
padding:3px; padding:3px;
margin:0px; margin:0px;
color:#DCDCDC;
border:1px solid #242424; border:1px solid #242424;
border-left-width:0px; border-left-width:0px;
border-right-width:1px; border-right-width:1px;
border-top-width:0px; border-top-width:0px;
border-bottom-width:1px; border-bottom-width:1px;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252);
} }
QTabBar::tab{ QTabBar::tab{