{"id":395,"date":"2024-07-22T15:15:11","date_gmt":"2024-07-22T07:15:11","guid":{"rendered":"https:\/\/noobxiaomeng.top\/?p=395"},"modified":"2024-07-22T16:46:33","modified_gmt":"2024-07-22T08:46:33","slug":"notepad_2","status":"publish","type":"post","link":"https:\/\/noobxiaomeng.top\/index.php\/2024\/07\/22\/notepad_2\/","title":{"rendered":"C++Qt\uff1a0x03.\u57fa\u4e8eQT5.12.12\u4e0eMinGW7.2.0\u5f00\u53d1\u7684\u6587\u672c\u7f16\u8f91\u5668_v2.0"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u7531\u4e8e\u672c\u6b21\u66f4\u65b0\u5728\u4f7f\u7528\u67d0\u4e9b\u529f\u80fd\u65f6\uff0c\u539f\u7248\u672cQT5.12.8\u4e0eMSVC2017\u7684\u7f16\u8bd1\u5668\u4f1a\u51fa\u73b0\u4e00\u4e9b\u62a5\u9519\uff0c\u56e0\u6b64\u6211\u5c06\u7248\u672c\u6362\u81f3\u4e86QT5.12.12\u4e0eMinGW7.2.0\u7f16\u8bd1\u5668<\/p>\n<p>\u5728\u672c\u6b21\u66f4\u65b0\u4e2d\u6dfb\u52a0\u4e86<\/p>\n<ul>\n<li>\u6ce8\u518c\u7801\u529f\u80fd\uff0c\u7528\u6237\u9700\u8981\u8f93\u5165\u7279\u5b9a\u7684\u6ce8\u518c\u7801\u624d\u80fd\u591f\u4f7f\u7528\u6b64\u6587\u672c\u7f16\u8f91\u5668<\/li>\n<li>\u67e5\u770b\u5386\u53f2\u8bb0\u5f55\u529f\u80fd\uff0c\u7528\u6237\u53ef\u5728\u6587\u4ef6\u680f\u67e5\u770b\u81ea\u5df1\u6700\u8fd1\u6253\u5f00\u7684\u6587\u4ef6\uff0c\u540c\u65f6\u53ef\u4ee5\u6e05\u9664\u5386\u53f2\u6253\u5f00\u8bb0\u5f55<\/li>\n<li>Base64\u7f16\u7801\u4e0e\u89e3\u7801\uff0c\u4f5c\u4e3a\u4e00\u540dCTFer\uff0c\u6211\u52a0\u4e0a\u4e86\u8fd9\u79cd\u5f88\u5e38\u89c1\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u540e\u7eed\u8ba1\u5212\u6dfb\u52a0\u66f4\u591a<\/li>\n<\/ul>\n<p>\u5b89\u88c5\u5305\u5728\u8fd9-&gt;<a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Xms-Notepad_2_0.zip\" title=\"Xm&#039;s Notepad_2_0\">Xm's Notepad_2_0<\/a><\/p>\n<h3>\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c<\/h3>\n<p>\u6253\u5f00\u7a0b\u5e8f\u65f6\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u754c\u9762<br \/>\n<a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722114902.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722114902.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722114902.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><br \/>\n\u8f93\u5165\u6b63\u786e\u6ce8\u518c\u7801\u4e4b\u540e<br \/>\n<a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115014.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115014.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115014.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><br \/>\n\u70b9\u51fbyes\u8fdb\u5165\u7a0b\u5e8f<\/p>\n<p><a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115055.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115055.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115055.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><\/p>\n<p>\u8fdb\u5165\u7a0b\u5e8f\u4e4b\u540e\u70b9\u51fb\u6587\u4ef6\u5c31\u53ef\u4ee5\u770b\u89c1\u6700\u8fd1\u6253\u5f00\u529f\u80fd\u4e86\uff0c\u540c\u65f6\u8fd8\u52a0\u4e0a\u4e86\u52a0\u89e3\u5bc6\u529f\u80fd\uff0c\u4e0d\u8fc7\u91cc\u9762\u73b0\u5728\u53ea\u6709Base64<\/p>\n<h3>\u9879\u76ee\u6587\u4ef6<\/h3>\n<p><a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115224.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115224.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722115224.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><\/p>\n<p>\u76f8\u8f83\u4e8e\u4e0a\u4e00\u7248\u7684\u6587\u4ef6\uff0c\u6211\u5728\u5176\u4e2d\u65b0\u5efa\u4e86\u4e00\u4e2aregister\u6587\u4ef6\uff0c\u4e5f\u5c31\u662flogin\u6ce8\u518c\u7a97\u53e3\uff0c\u5728\u5176\u4e2d\u5b9e\u73b0\u4e86\u4e00\u4e9b\u529f\u80fd\uff1a<\/p>\n<ul>\n<li>\u5bf9\u6ce8\u518c\u7801\u8f93\u5165\u662f\u5426\u6b63\u786e\u7684\u5224\u65ad<\/li>\n<li>\u6bcf\u4e2a\u6309\u94ae\u63a7\u4ef6\u6240\u5bf9\u5e94\u7684\u8f93\u51fa\u7ed3\u679c<\/li>\n<li>\u7981\u7528\u5173\u95ed\u8be5\u7a97\u53e3\u63a7\u4ef6\uff0c\u65e0\u6cd5\u901a\u8fc7\u53f3\u4e0a\u89d2\u00d7\u53f7\u5173\u95ed\u8be5\u7a97\u53e3<\/li>\n<li>\u7981\u7528\u4efb\u52a1\u7ba1\u7406\u5668\u4e2d\u5173\u95ed\u8be5\u7a97\u53e3\uff0c\u65e0\u6cd5\u4f7f\u7528\u4efb\u52a1\u7ba1\u7406\u5668\u6740\u6b7b\u8be5\u7a97\u53e3\u8fdb\u7a0b<\/li>\n<\/ul>\n<h3>\u4ee3\u7801\u5b9e\u73b0<\/h3>\n<h4>mainwindow.h<\/h4>\n<p>\u6b63\u5e38\u7684\u69fd\u51fd\u6570\u5b9a\u4e49<\/p>\n<pre><code class=\"language-cpp\">#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include &lt;QMainWindow&gt;\n\nQT_BEGIN_NAMESPACE\nnamespace Ui { class MainWindow; }\nQT_END_NAMESPACE\n\nclass MainWindow : public QMainWindow\n{\n    Q_OBJECT\n\npublic:\n    MainWindow(QWidget *parent = nullptr);\n    ~MainWindow();\n\nprivate slots:\n    void on_new_file_triggered();\n\n    void on_open_file_triggered();\n\n    void on_save_file_triggered();\n\n    void on_save_as_triggered();\n\n    void on_paste_triggered();\n\n    void on_cut_triggered();\n\n    void on_copy_triggered();\n\n    void on_italics_triggered(bool italics);\n\n    void on_underline_triggered(bool underline);\n\n    void on_bolder_triggered(bool bolder);\n\n    void on_font_triggered();\n\n    void on_about_triggered();\n\n    void on_undo_triggered();\n\n    void on_redo_triggered();\n\n    void on_exit_triggered();\n\n    void on_print_triggered();\n\n    void on_clear_history_triggered();\n\n    void on_actionBase64_triggered();\n\n    void on_tobase64_triggered();\n\nprivate:\n    Ui::MainWindow *ui;\n    QString currentFile;\n    void initMenu();\n    void on_open_recent_file();\n};\n#endif \/\/ MAINWINDOW_H\n<\/code><\/pre>\n<h4>register.h<\/h4>\n<p>\u5b9a\u4e49\u4e86\u4e00\u4e2aprotected\u7684<code>nativeEvent<\/code>\u65b9\u6cd5\uff0c\u4ee5\u4fbf\u4e8e\u540e\u9762\u4f7f\u7528<\/p>\n<pre><code class=\"language-cpp\">#ifndef REGISTER_H\n#define REGISTER_H\n\n#include &lt;QDialog&gt;\n#include &lt;windows.h&gt;\n\nnamespace Ui {\nclass Register;\n}\n\nclass Register : public QDialog\n{\n    Q_OBJECT\n\npublic:\n    explicit Register(QWidget *parent = nullptr);\n    ~Register();\n\nprivate slots:\n\n    void on_pushButton_clicked();\n\n    void on_pushButton_2_clicked();\n\nprivate:\n    Ui::Register *ui;\n\nprotected:\n    virtual bool nativeEvent(const QByteArray &amp;eventType, void *message, long *result);\n};\n\n#endif \/\/ REGISTER_H\n<\/code><\/pre>\n<h4>main.cpp<\/h4>\n<p>\u663e\u793a\u7a97\u53e3<\/p>\n<pre><code class=\"language-cpp\">#include &quot;mainwindow.h&quot;\n#include &quot;register.h&quot;\n\n#include &lt;QApplication&gt;\n\nint main(int argc, char *argv[])\n{\n    QApplication a(argc, argv);\n    MainWindow w;\n    w.show();\n    return a.exec();\n}\n<\/code><\/pre>\n<h4>mainwindow.cpp<\/h4>\n<p>\u4e3b\u8981\u529f\u80fd\u5b9e\u73b0\u90e8\u5206<\/p>\n<pre><code class=\"language-cpp\">#include &quot;mainwindow.h&quot;\n#include &quot;ui_mainwindow.h&quot;\n#include &lt;QDebug&gt;\n#include &quot;QFileDialog&quot;\n#include &quot;QMessageBox&quot;\n#include &quot;QFontDialog&quot;\n#include &quot;QSettings&quot;\n#include &quot;QList&quot;\n#include &quot;QByteArray&quot;\n#include &quot;register.h&quot;\n\n#if defined(QT_PRINTSUPPORT_LIB)\n#include &lt;QtPrintSupport\/qtprintsupportglobal.h&gt;\n#if QT_CONFIG(printer)\n#if QT_CONFIG(printdialog)\n#include &lt;QPrintDialog&gt;\n#endif\n#include &lt;QPrinter&gt;\n#endif\n#endif\n\nQSettings * mSettings;\n\n\/\/\u83b7\u53d6\u5386\u53f2\u8bb0\u5f55\nQList&lt;QString&gt; getHistory();\n\/\/\u4fdd\u5b58\u6253\u5f00\u5386\u53f2\u8bb0\u5f55\nvoid saveHistory(QString path);\n\nMainWindow::MainWindow(QWidget *parent)\n    : QMainWindow(parent)\n    , ui(new Ui::MainWindow)\n{\n    Register *pRes = new Register();\n    pRes-&gt;exec();\n    ui-&gt;setupUi(this);    \n    this-&gt;setCentralWidget(ui-&gt;textEdit);\n    if(mSettings==NULL){\n        mSettings = new QSettings(&quot;settings.ini&quot;,QSettings::IniFormat);\n    }\n\n    initMenu();\n\n#if !QT_CONFIG(printer)\n    ui-&gt;print-&gt;setEnabled(false);\n#endif\n}\n\nMainWindow::~MainWindow()\n{\n    delete ui;\n}\n\n\/\/\u521d\u59cb\u5316\u83dc\u5355\nvoid MainWindow::initMenu()\n{\n    \/\/\u83b7\u53d6menu\n    QMenu * recent = this-&gt;findChild&lt;QMenu *&gt;(&quot;recent&quot;);\n\n    \/\/\u83b7\u53d6Action\n    QSet&lt;QObject *&gt; chLists = recent-&gt;children().toSet();\n    foreach(QObject * ch,chLists){\n        QAction *action = (QAction *)ch;\n        \/\/\u6e05\u7a7a\u5b50\u83dc\u5355Action\n        recent-&gt;removeAction(action);\n    }\n\n    QList&lt;QString&gt; lists = getHistory();\n\n    for(int i = lists.size()-1;i&gt;=0;i--){\n        \/\/\u751f\u6210\u5b50\u83dc\u5355Action\n        recent-&gt;addAction(lists[i],this,&amp;MainWindow::on_open_recent_file);\n    }\n    \/*\n    foreach(QString str,lists){\n        \/\/\u751f\u6210\u5b50\u83dc\u5355Action\n        recent-&gt;addAction(str,this,&amp;MainWindow::on_open_recent_file);\n    }\n    *\/\n    if(lists.size()&gt;0){\n        recent-&gt;addAction(&quot;\u6e05\u9664\u5386\u53f2\u8bb0\u5f55&quot;,this,&amp;MainWindow::on_clear_history_triggered,QKeySequence(&quot;Ctrl+Alt+Shift+C&quot;));\n    }\n}\n\n\/\/\u83b7\u53d6\u5386\u53f2\u8bb0\u5f55\nQList&lt;QString&gt; getHistory(){\n    \/\/\u6253\u5f00\u5f00\u59cb\u8bfb\n    int size = mSettings-&gt;beginReadArray(&quot;history&quot;);\n\n    \/\/\u521b\u5efa\u8fd4\u56de\u5bf9\u8c61\n    QList&lt;QString&gt; lists;\n    for(int i = 0;i&lt;size;i++){\n        mSettings-&gt;setArrayIndex(i);\n        QString path = mSettings-&gt;value(&quot;path&quot;).toString();\n        lists.append(path);\n        qDebug() &lt;&lt; i &lt;&lt; &quot;:&quot; &lt;&lt; path;\n    }\n\n    \/\/\u5173\u95ed\u8bfb\n    mSettings-&gt;endArray();\n\n    return lists;\n}\n\n\/\/\u4fdd\u5b58\u6253\u5f00\u5386\u53f2\u8bb0\u5f55\nvoid saveHistory(QString path){\n\n    \/\/\u83b7\u53d6\u5386\u53f2\n    QList&lt;QString&gt; lists = getHistory();\n\n    foreach(QString str,lists){\n        if(str==path){\n            lists.removeOne(str);\n        }\n    }\n    lists.append(path);\n\n    \/\/\u6253\u5f00\u5f00\u59cb\u5199\u5165\n    mSettings-&gt;beginWriteArray(&quot;history&quot;);\n    for (int i = 0; i&lt;lists.size() ;i++ ) {\n        mSettings-&gt;setArrayIndex(i);\n\n        \/\/\u4fdd\u5b58\u5b57\u7b26\u4e32\n        mSettings-&gt;setValue(&quot;path&quot;,lists[i]);\n    }\n\n    \/\/\u5173\u95ed\u5f00\u59cb\u5199\u5165\n    mSettings-&gt;endArray();\n}\n\n\/\/\u65b0\u5efa\u6587\u4ef6\nvoid MainWindow::on_new_file_triggered()\n{\n    qDebug()&lt;&lt;&quot;Start Create New File ...&quot;;\n    currentFile.clear();\n    ui-&gt;textEdit-&gt;setText(&quot;&quot;);\n}\n\n\/\/\u6253\u5f00\u6587\u4ef6\nvoid MainWindow::on_open_recent_file()\n{\n    QAction * action = (QAction *)sender();\n\n    QString fileName = action-&gt;text();\n\n    QFile file(fileName);\n    if(!file.open(QIODevice::ReadOnly|QFile::Text)){\n        QMessageBox::warning(this,&quot;\u8b66\u544a&quot;,&quot;\u65e0\u6cd5\u6253\u5f00\u6b64\u6587\u4ef6&quot;+file.errorString());\n        return;\n    }\n\n    currentFile = fileName;\n    setWindowTitle(fileName);\n    QTextStream in(&amp;file);\n    QString text = in.readAll();\n    ui-&gt;textEdit-&gt;setText(text);\n    file.close();\n    saveHistory(currentFile);\n    initMenu();\n}\n\n\/\/\u6253\u5f00\u6587\u4ef6\nvoid MainWindow::on_open_file_triggered()\n{\n    QString fileName = QFileDialog::getOpenFileName(this,&quot;\u6253\u5f00\u6587\u4ef6&quot;);\n    QFile file(fileName);\n    if(!file.open(QIODevice::ReadOnly|QFile::Text)){\n        QMessageBox::warning(this,&quot;\u8b66\u544a&quot;,&quot;\u65e0\u6cd5\u6253\u5f00\u6b64\u6587\u4ef6:&quot;+file.errorString());\n        return;\n    }\n    currentFile = fileName;\n    setWindowTitle(fileName);\n    QTextStream in(&amp;file);\n    QString text = in.readAll();\n    ui-&gt;textEdit-&gt;setText(text);\n    file.close();\n\n    saveHistory(currentFile);\n    initMenu();\n}\n\n\/\/\u4fdd\u5b58\u6587\u4ef6\nvoid MainWindow::on_save_file_triggered()\n{\n    QString fileName;\n    if(currentFile.isEmpty()){\n        fileName =QFileDialog::getSaveFileName(this,&quot;\u4fdd\u5b58\u6587\u4ef6&quot;);\n        currentFile =fileName;\n    }else{\n        fileName =currentFile;\n    }\n    QFile file(fileName);\n    if(!file.open(QIODevice::WriteOnly|QFile::Text)){\n        QMessageBox::warning(this,&quot;\u8b66\u544a&quot;,&quot;\u65e0\u6cd5\u4fdd\u5b58\u6587\u4ef6:&quot;+file.errorString());\n        return;\n    }\n    setWindowTitle(fileName);\n    QTextStream out(&amp;file);\n    QString text =ui-&gt;textEdit-&gt;toHtml();\n    out&lt;&lt;text;\n    file.close();\n    saveHistory(currentFile);\n    initMenu();\n}\n\n\/\/\u53e6\u5b58\u4e3a\nvoid MainWindow::on_save_as_triggered()\n{\n    QString fileName=QFileDialog::getSaveFileName(this,&quot;\u53e6\u5b58\u6587\u4ef6&quot;);\n    QFile file(fileName);\n    if(!file.open(QIODevice::WriteOnly|QFile::Text)){\n        QMessageBox::warning(this,&quot;\u8b66\u544a&quot;,&quot;\u65e0\u6cd5\u4fdd\u5b58\u6587\u4ef6:&quot;+file.errorString());\n        return;\n    }\n    currentFile =fileName;\n    setWindowTitle(fileName);\n    QTextStream out(&amp;file);\n    QString text =ui-&gt;textEdit-&gt;toHtml();\n    out&lt;&lt;text;\n    file.close();\n    saveHistory(currentFile);\n}\n\n\/\/\u590d\u5236\nvoid MainWindow::on_copy_triggered()\n{\n    ui-&gt;textEdit-&gt;copy();\n}\n\n\/\/\u7c98\u8d34\nvoid MainWindow::on_paste_triggered()\n{\n    ui-&gt;textEdit-&gt;paste();\n}\n\n\/\/\u526a\u5207\nvoid MainWindow::on_cut_triggered()\n{\n    ui-&gt;textEdit-&gt;cut();\n}\n\n\/\/\u659c\u4f53\nvoid MainWindow::on_italics_triggered(bool italics)\n{\n    ui-&gt;textEdit-&gt;setFontItalic(italics);\n}\n\n\/\/\u4e0b\u5212\u7ebf\nvoid MainWindow::on_underline_triggered(bool underline)\n{\n    ui-&gt;textEdit-&gt;setFontUnderline(underline);\n}\n\n\/\/\u52a0\u7c97\nvoid MainWindow::on_bolder_triggered(bool bolder)\n{\n    ui-&gt;textEdit-&gt;setFontWeight(bolder?QFont::Bold:QFont::Normal);\n}\n\n\/\/\u64a4\u9500\nvoid MainWindow::on_undo_triggered()\n{\n    ui-&gt;textEdit-&gt;undo();\n}\n\n\/\/\u53d6\u6d88\u64a4\u9500\nvoid MainWindow::on_redo_triggered()\n{\n    ui-&gt;textEdit-&gt;redo();\n}\n\n\/\/\u5b57\u4f53\nvoid MainWindow::on_font_triggered()\n{\n    bool fontSelected;\n    QFont font = QFontDialog::getFont(&amp;fontSelected,this);\n    if(fontSelected){\n        ui-&gt;textEdit-&gt;setFont(font);\n    }\n}\n\n\/\/\u6253\u5370\nvoid MainWindow::on_print_triggered()\n{\n#if defined(QT_PRINTSUPPORT_LIB) &amp;&amp; QT_CONFIG(printer)\n    QPrinter printDev;\n#if QT_CONFIG(printdialog)\n    QPrintDialog dialog(&amp;printDev,this);\n    if(dialog.exec()==QDialog::Rejected)\n        return;\n#endif\n    ui-&gt;textEdit-&gt;print(&amp;printDev);\n#endif\n}\n\n\/\/\u5173\u4e8e\nvoid MainWindow::on_about_triggered()\n{\n    QMessageBox::about(this,&quot;Welcome to C++Qt!&quot;,&quot;\u8fd9\u662f\u6653\u68a6ovo\u7684Notepad\u54e6&quot;);\n}\n\n\/\/\u9000\u51fa\nvoid MainWindow::on_exit_triggered()\n{\n    QCoreApplication::exit();\n}\n\nvoid MainWindow::on_clear_history_triggered()\n{\n    qDebug() &lt;&lt; &quot;on_clear_history_triggered clickde...&quot;;\n    mSettings-&gt;remove(&quot;history&quot;);\n    initMenu();\n}\n\nvoid MainWindow::on_actionBase64_triggered()\n{\n    QString frombase64 = ui-&gt;textEdit-&gt;toPlainText();\n\n    QByteArray text = QByteArray::fromBase64(frombase64.toLocal8Bit());\n\n    \/\/qDebug() &lt;&lt; text;\n\n    ui-&gt;textEdit-&gt;setPlainText(text);\n}\n\nvoid MainWindow::on_tobase64_triggered()\n{\n    QString tobase64 = ui-&gt;textEdit-&gt;toPlainText();\n\n    QByteArray text = tobase64.toLocal8Bit().toBase64();\n\n    \/\/qDebug() &lt;&lt; text;\n\n    ui-&gt;textEdit-&gt;setPlainText(text);\n}\n<\/code><\/pre>\n<h4>register.cpp<\/h4>\n<p>\u5b9e\u73b0\u4e86\u9650\u5236\u7a97\u53e3\u7f29\u653e\u4e0e\u5173\u95ed\u4e0e\u6ce8\u518c\u7801\u529f\u80fd<\/p>\n<pre><code class=\"language-cpp\">#include &quot;register.h&quot;\n#include &quot;ui_register.h&quot;\n#include &quot;QMessageBox&quot;\n\nRegister::Register(QWidget *parent) :\n    QDialog(parent),\n    ui(new Ui::Register)\n{\n    ui-&gt;setupUi(this);\n    setWindowFlags(Qt::CustomizeWindowHint |\n                   Qt::WindowMinimizeButtonHint\n                   );\n    setFixedSize(this-&gt;width(), this-&gt;height());\n}\n\nRegister::~Register()\n{\n    delete ui;\n}\n\nvoid Register::on_pushButton_clicked()\n{\n    if(ui-&gt;lineEdit-&gt;text()==tr(&quot;123456&quot;)){\n        QMessageBox::information(this,tr(&quot;Ciallo\uff5e(\u2220\u30fb\u03c9&lt; )\u2312\u2605&quot;),tr(&quot;\u5c45\u7136\u88ab\u4f60\u731c\u51fa\u6765\u4e86&quot;),QMessageBox::Yes);\n        accept();\n    }\n    else{\n        QMessageBox::warning(this,tr(&quot;\u4e0d\u77e5\u9053\u6ce8\u518c\u7801\u4f60\u778e\u70b9\u4ec0\u4e48&quot;),tr(&quot;\u6ce8\u518c\u7801\u4e0d\u5bf9\u54e6&quot;),QMessageBox::Yes);\n        exit(0);\n    }\n}\n\nvoid Register::on_pushButton_2_clicked()\n{\n    QMessageBox::warning(this,tr(&quot;\u6ce8\u518c\u7801\u5462\u6ce8\u518c\u7801\u5462&quot;),tr(&quot;\u600e\u4e48\u4e0d\u8bd5\u8bd5\u6ce8\u518c\u7801\u662f\u4ec0\u4e48&quot;),QMessageBox::Yes);\n    exit(0);\n}\n\nbool Register::nativeEvent(const QByteArray &amp;eventType, void *message, long *result)\n{\n    MSG *msg = (MSG *)message;\n    if (msg-&gt;message == WM_SYSCOMMAND)\n    {\n        if (61536 == msg-&gt;wParam)\/\/\u7981\u6b62\u4efb\u52a1\u680f&quot;\u5173\u95ed\u7a97\u53e3&quot;\n        {\n            QMessageBox::warning(this,tr(&quot;\u522b\u4e71\u70b9&quot;),tr(&quot;\u4e0d\u662f\uff0c\u8c01\u8ba9\u4f60\u70b9\u8fd9\u4e86?&quot;),QMessageBox::Yes);\n            return true;\n        }\n        if (61587 == msg-&gt;wParam)\/\/\u7981\u7528\u5355\u51fb\n        {\n            return true;\n        }\n        if (61539 == msg-&gt;wParam)\/\/\u7981\u7528\u53cc\u51fb\n        {\n            return true;\n        }\n    }\n    return QDialog::nativeEvent(eventType, message, result);\n}\n<\/code><\/pre>\n<h4>mainwindow.ui<\/h4>\n<p><a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722145538.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722145538.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722145538.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><\/p>\n<pre><code class=\"language-html\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;ui version=&quot;4.0&quot;&gt;\n &lt;class&gt;MainWindow&lt;\/class&gt;\n &lt;widget class=&quot;QMainWindow&quot; name=&quot;MainWindow&quot;&gt;\n  &lt;property name=&quot;geometry&quot;&gt;\n   &lt;rect&gt;\n    &lt;x&gt;0&lt;\/x&gt;\n    &lt;y&gt;0&lt;\/y&gt;\n    &lt;width&gt;800&lt;\/width&gt;\n    &lt;height&gt;600&lt;\/height&gt;\n   &lt;\/rect&gt;\n  &lt;\/property&gt;\n  &lt;property name=&quot;windowTitle&quot;&gt;\n   &lt;string&gt;Xm&#039;s Notepad&lt;\/string&gt;\n  &lt;\/property&gt;\n  &lt;property name=&quot;windowIcon&quot;&gt;\n   &lt;iconset resource=&quot;images.qrc&quot;&gt;\n    &lt;normaloff&gt;:\/images\/images\/pencil.png&lt;\/normaloff&gt;:\/images\/images\/pencil.png&lt;\/iconset&gt;\n  &lt;\/property&gt;\n  &lt;widget class=&quot;QWidget&quot; name=&quot;centralwidget&quot;&gt;\n   &lt;widget class=&quot;QTextEdit&quot; name=&quot;textEdit&quot;&gt;\n    &lt;property name=&quot;geometry&quot;&gt;\n     &lt;rect&gt;\n      &lt;x&gt;13&lt;\/x&gt;\n      &lt;y&gt;10&lt;\/y&gt;\n      &lt;width&gt;131&lt;\/width&gt;\n      &lt;height&gt;111&lt;\/height&gt;\n     &lt;\/rect&gt;\n    &lt;\/property&gt;\n   &lt;\/widget&gt;\n  &lt;\/widget&gt;\n  &lt;widget class=&quot;QMenuBar&quot; name=&quot;menubar&quot;&gt;\n   &lt;property name=&quot;geometry&quot;&gt;\n    &lt;rect&gt;\n     &lt;x&gt;0&lt;\/x&gt;\n     &lt;y&gt;0&lt;\/y&gt;\n     &lt;width&gt;800&lt;\/width&gt;\n     &lt;height&gt;23&lt;\/height&gt;\n    &lt;\/rect&gt;\n   &lt;\/property&gt;\n   &lt;widget class=&quot;QMenu&quot; name=&quot;menu&quot;&gt;\n    &lt;property name=&quot;title&quot;&gt;\n     &lt;string&gt;\u6587\u4ef6&lt;\/string&gt;\n    &lt;\/property&gt;\n    &lt;widget class=&quot;QMenu&quot; name=&quot;recent&quot;&gt;\n     &lt;property name=&quot;title&quot;&gt;\n      &lt;string&gt;\u6700\u8fd1\u6253\u5f00&lt;\/string&gt;\n     &lt;\/property&gt;\n    &lt;\/widget&gt;\n    &lt;addaction name=&quot;new_file&quot;\/&gt;\n    &lt;addaction name=&quot;open_file&quot;\/&gt;\n    &lt;addaction name=&quot;recent&quot;\/&gt;\n    &lt;addaction name=&quot;separator&quot;\/&gt;\n    &lt;addaction name=&quot;save_file&quot;\/&gt;\n    &lt;addaction name=&quot;save_as&quot;\/&gt;\n    &lt;addaction name=&quot;separator&quot;\/&gt;\n    &lt;addaction name=&quot;print&quot;\/&gt;\n    &lt;addaction name=&quot;separator&quot;\/&gt;\n    &lt;addaction name=&quot;exit&quot;\/&gt;\n   &lt;\/widget&gt;\n   &lt;widget class=&quot;QMenu&quot; name=&quot;menu_2&quot;&gt;\n    &lt;property name=&quot;title&quot;&gt;\n     &lt;string&gt;\u7f16\u8f91&lt;\/string&gt;\n    &lt;\/property&gt;\n    &lt;addaction name=&quot;copy&quot;\/&gt;\n    &lt;addaction name=&quot;paste&quot;\/&gt;\n    &lt;addaction name=&quot;cut&quot;\/&gt;\n    &lt;addaction name=&quot;separator&quot;\/&gt;\n    &lt;addaction name=&quot;bolder&quot;\/&gt;\n    &lt;addaction name=&quot;italics&quot;\/&gt;\n    &lt;addaction name=&quot;underline&quot;\/&gt;\n    &lt;addaction name=&quot;separator&quot;\/&gt;\n    &lt;addaction name=&quot;font&quot;\/&gt;\n   &lt;\/widget&gt;\n   &lt;widget class=&quot;QMenu&quot; name=&quot;menu_3&quot;&gt;\n    &lt;property name=&quot;title&quot;&gt;\n     &lt;string&gt;\u5173\u4e8e&lt;\/string&gt;\n    &lt;\/property&gt;\n    &lt;addaction name=&quot;about&quot;\/&gt;\n   &lt;\/widget&gt;\n   &lt;widget class=&quot;QMenu&quot; name=&quot;menu_4&quot;&gt;\n    &lt;property name=&quot;title&quot;&gt;\n     &lt;string&gt;\u52a0\u89e3\u5bc6&lt;\/string&gt;\n    &lt;\/property&gt;\n    &lt;addaction name=&quot;tobase64&quot;\/&gt;\n    &lt;addaction name=&quot;actionBase64&quot;\/&gt;\n   &lt;\/widget&gt;\n   &lt;addaction name=&quot;menu&quot;\/&gt;\n   &lt;addaction name=&quot;menu_2&quot;\/&gt;\n   &lt;addaction name=&quot;menu_3&quot;\/&gt;\n   &lt;addaction name=&quot;menu_4&quot;\/&gt;\n  &lt;\/widget&gt;\n  &lt;widget class=&quot;QStatusBar&quot; name=&quot;statusbar&quot;\/&gt;\n  &lt;widget class=&quot;QToolBar&quot; name=&quot;toolBar&quot;&gt;\n   &lt;property name=&quot;windowTitle&quot;&gt;\n    &lt;string&gt;toolBar&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;attribute name=&quot;toolBarArea&quot;&gt;\n    &lt;enum&gt;TopToolBarArea&lt;\/enum&gt;\n   &lt;\/attribute&gt;\n   &lt;attribute name=&quot;toolBarBreak&quot;&gt;\n    &lt;bool&gt;false&lt;\/bool&gt;\n   &lt;\/attribute&gt;\n   &lt;addaction name=&quot;new_file&quot;\/&gt;\n   &lt;addaction name=&quot;open_file&quot;\/&gt;\n   &lt;addaction name=&quot;print&quot;\/&gt;\n   &lt;addaction name=&quot;save_file&quot;\/&gt;\n   &lt;addaction name=&quot;save_as&quot;\/&gt;\n  &lt;\/widget&gt;\n  &lt;widget class=&quot;QToolBar&quot; name=&quot;toolBar_2&quot;&gt;\n   &lt;property name=&quot;windowTitle&quot;&gt;\n    &lt;string&gt;toolBar_2&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;attribute name=&quot;toolBarArea&quot;&gt;\n    &lt;enum&gt;TopToolBarArea&lt;\/enum&gt;\n   &lt;\/attribute&gt;\n   &lt;attribute name=&quot;toolBarBreak&quot;&gt;\n    &lt;bool&gt;false&lt;\/bool&gt;\n   &lt;\/attribute&gt;\n   &lt;addaction name=&quot;copy&quot;\/&gt;\n   &lt;addaction name=&quot;paste&quot;\/&gt;\n   &lt;addaction name=&quot;cut&quot;\/&gt;\n  &lt;\/widget&gt;\n  &lt;widget class=&quot;QToolBar&quot; name=&quot;toolBar_3&quot;&gt;\n   &lt;property name=&quot;windowTitle&quot;&gt;\n    &lt;string&gt;toolBar_3&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;attribute name=&quot;toolBarArea&quot;&gt;\n    &lt;enum&gt;TopToolBarArea&lt;\/enum&gt;\n   &lt;\/attribute&gt;\n   &lt;attribute name=&quot;toolBarBreak&quot;&gt;\n    &lt;bool&gt;false&lt;\/bool&gt;\n   &lt;\/attribute&gt;\n   &lt;addaction name=&quot;bolder&quot;\/&gt;\n   &lt;addaction name=&quot;italics&quot;\/&gt;\n   &lt;addaction name=&quot;underline&quot;\/&gt;\n   &lt;addaction name=&quot;font&quot;\/&gt;\n  &lt;\/widget&gt;\n  &lt;widget class=&quot;QToolBar&quot; name=&quot;toolBar_4&quot;&gt;\n   &lt;property name=&quot;windowTitle&quot;&gt;\n    &lt;string&gt;toolBar_4&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;attribute name=&quot;toolBarArea&quot;&gt;\n    &lt;enum&gt;TopToolBarArea&lt;\/enum&gt;\n   &lt;\/attribute&gt;\n   &lt;attribute name=&quot;toolBarBreak&quot;&gt;\n    &lt;bool&gt;false&lt;\/bool&gt;\n   &lt;\/attribute&gt;\n   &lt;addaction name=&quot;undo&quot;\/&gt;\n   &lt;addaction name=&quot;redo&quot;\/&gt;\n  &lt;\/widget&gt;\n  &lt;widget class=&quot;QToolBar&quot; name=&quot;toolBar_5&quot;&gt;\n   &lt;property name=&quot;windowTitle&quot;&gt;\n    &lt;string&gt;toolBar_5&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;attribute name=&quot;toolBarArea&quot;&gt;\n    &lt;enum&gt;TopToolBarArea&lt;\/enum&gt;\n   &lt;\/attribute&gt;\n   &lt;attribute name=&quot;toolBarBreak&quot;&gt;\n    &lt;bool&gt;false&lt;\/bool&gt;\n   &lt;\/attribute&gt;\n   &lt;addaction name=&quot;about&quot;\/&gt;\n   &lt;addaction name=&quot;exit&quot;\/&gt;\n  &lt;\/widget&gt;\n  &lt;action name=&quot;new_file&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/new.png&lt;\/normaloff&gt;:\/images\/images\/new.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u65b0\u5efa\u6587\u4ef6&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+N&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;open_file&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/open.png&lt;\/normaloff&gt;:\/images\/images\/open.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u6253\u5f00\u6587\u4ef6&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+O&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;save_file&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/save.png&lt;\/normaloff&gt;:\/images\/images\/save.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u4fdd\u5b58\u6587\u4ef6&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+S&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;save_as&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/save_as.png&lt;\/normaloff&gt;:\/images\/images\/save_as.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u53e6\u5b58\u4e3a&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+Shift+S&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;paste&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/paste.png&lt;\/normaloff&gt;:\/images\/images\/paste.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u7c98\u8d34&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+V&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;cut&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/cut.png&lt;\/normaloff&gt;:\/images\/images\/cut.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u526a\u5207&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+X&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;copy&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/copy.png&lt;\/normaloff&gt;:\/images\/images\/copy.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u590d\u5236&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+C&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;bolder&quot;&gt;\n   &lt;property name=&quot;checkable&quot;&gt;\n    &lt;bool&gt;true&lt;\/bool&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/bold.png&lt;\/normaloff&gt;:\/images\/images\/bold.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u52a0\u7c97&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+B&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;italics&quot;&gt;\n   &lt;property name=&quot;checkable&quot;&gt;\n    &lt;bool&gt;true&lt;\/bool&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/italic.png&lt;\/normaloff&gt;:\/images\/images\/italic.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u659c\u4f53&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+I&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;underline&quot;&gt;\n   &lt;property name=&quot;checkable&quot;&gt;\n    &lt;bool&gt;true&lt;\/bool&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/underline.png&lt;\/normaloff&gt;:\/images\/images\/underline.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u4e0b\u5212\u7ebf&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+U&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;font&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/font.png&lt;\/normaloff&gt;:\/images\/images\/font.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u5b57\u4f53&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+Shift+F&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;about&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/info.png&lt;\/normaloff&gt;:\/images\/images\/info.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u5173\u4e8e&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+Shift+I&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;undo&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/edit_undo.png&lt;\/normaloff&gt;:\/images\/images\/edit_undo.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u64a4\u56de&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+Z&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;redo&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/edit_redo.png&lt;\/normaloff&gt;:\/images\/images\/edit_redo.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u53d6\u6d88\u64a4\u56de&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+Shift+Z&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;exit&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/exit.png&lt;\/normaloff&gt;:\/images\/images\/exit.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u9000\u51fa&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Esc&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;print&quot;&gt;\n   &lt;property name=&quot;icon&quot;&gt;\n    &lt;iconset resource=&quot;images.qrc&quot;&gt;\n     &lt;normaloff&gt;:\/images\/images\/print.png&lt;\/normaloff&gt;:\/images\/images\/print.png&lt;\/iconset&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u6253\u5370&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+P&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;clear_history&quot;&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;\u6e05\u9664\u6253\u5f00\u5386\u53f2\u8bb0\u5f55&lt;\/string&gt;\n   &lt;\/property&gt;\n   &lt;property name=&quot;shortcut&quot;&gt;\n    &lt;string&gt;Ctrl+Alt+Shift+C&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;actionBase64&quot;&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;Base64\u89e3\u7801&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n  &lt;action name=&quot;tobase64&quot;&gt;\n   &lt;property name=&quot;text&quot;&gt;\n    &lt;string&gt;base64\u7f16\u7801&lt;\/string&gt;\n   &lt;\/property&gt;\n  &lt;\/action&gt;\n &lt;\/widget&gt;\n &lt;resources&gt;\n  &lt;include location=&quot;images.qrc&quot;\/&gt;\n &lt;\/resources&gt;\n &lt;connections\/&gt;\n&lt;\/ui&gt;\n<\/code><\/pre>\n<h4>register.ui<\/h4>\n<p><a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722145622.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722145622.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722145622.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><\/p>\n<pre><code class=\"language-html\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;ui version=&quot;4.0&quot;&gt;\n &lt;class&gt;Register&lt;\/class&gt;\n &lt;widget class=&quot;QDialog&quot; name=&quot;Register&quot;&gt;\n  &lt;property name=&quot;geometry&quot;&gt;\n   &lt;rect&gt;\n    &lt;x&gt;0&lt;\/x&gt;\n    &lt;y&gt;0&lt;\/y&gt;\n    &lt;width&gt;400&lt;\/width&gt;\n    &lt;height&gt;300&lt;\/height&gt;\n   &lt;\/rect&gt;\n  &lt;\/property&gt;\n  &lt;property name=&quot;windowTitle&quot;&gt;\n   &lt;string&gt;login&lt;\/string&gt;\n  &lt;\/property&gt;\n  &lt;widget class=&quot;QWidget&quot; name=&quot;layoutWidget&quot;&gt;\n   &lt;property name=&quot;geometry&quot;&gt;\n    &lt;rect&gt;\n     &lt;x&gt;20&lt;\/x&gt;\n     &lt;y&gt;70&lt;\/y&gt;\n     &lt;width&gt;351&lt;\/width&gt;\n     &lt;height&gt;141&lt;\/height&gt;\n    &lt;\/rect&gt;\n   &lt;\/property&gt;\n   &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_2&quot;&gt;\n    &lt;item&gt;\n     &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout&quot;&gt;\n      &lt;item&gt;\n       &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout&quot;&gt;\n        &lt;item&gt;\n         &lt;widget class=&quot;QLabel&quot; name=&quot;label&quot;&gt;\n          &lt;property name=&quot;text&quot;&gt;\n           &lt;string&gt;\u8bf7\u8f93\u5165\u6ce8\u518c\u7801\uff1a&lt;\/string&gt;\n          &lt;\/property&gt;\n         &lt;\/widget&gt;\n        &lt;\/item&gt;\n        &lt;item&gt;\n         &lt;widget class=&quot;QLineEdit&quot; name=&quot;lineEdit&quot;\/&gt;\n        &lt;\/item&gt;\n       &lt;\/layout&gt;\n      &lt;\/item&gt;\n     &lt;\/layout&gt;\n    &lt;\/item&gt;\n    &lt;item&gt;\n     &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_2&quot;&gt;\n      &lt;item&gt;\n       &lt;widget class=&quot;QPushButton&quot; name=&quot;pushButton&quot;&gt;\n        &lt;property name=&quot;text&quot;&gt;\n         &lt;string&gt;\u786e\u5b9a&lt;\/string&gt;\n        &lt;\/property&gt;\n       &lt;\/widget&gt;\n      &lt;\/item&gt;\n      &lt;item&gt;\n       &lt;widget class=&quot;QPushButton&quot; name=&quot;pushButton_2&quot;&gt;\n        &lt;property name=&quot;text&quot;&gt;\n         &lt;string&gt;\u8fd4\u56de&lt;\/string&gt;\n        &lt;\/property&gt;\n       &lt;\/widget&gt;\n      &lt;\/item&gt;\n     &lt;\/layout&gt;\n    &lt;\/item&gt;\n   &lt;\/layout&gt;\n  &lt;\/widget&gt;\n &lt;\/widget&gt;\n &lt;resources\/&gt;\n &lt;connections\/&gt;\n&lt;\/ui&gt;\n<\/code><\/pre>\n<h3>\u9879\u76ee\u6784\u5efa<\/h3>\n<p>\u548c\u4e4b\u524d\u7684\u9879\u76ee\u6784\u5efa\u65b9\u6cd5\u4e00\u6837\uff0c\u6211\u4eec\u5c06\u6240\u6709\u914d\u7f6e\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u5b89\u88c5\u5305<br \/>\n<a href=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722150349.png\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722150349.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/noobxiaomeng.top\/wp-content\/uploads\/2024\/07\/Pasted-image-20240722150349.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/a><br \/>\n2.0\u7248\u672c\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u672c\u6b21\u66f4\u65b0\u5728\u4f7f\u7528\u67d0\u4e9b\u529f\u80fd\u65f6\uff0c\u539f\u7248\u672cQT5.12.8\u4e0eMSVC2017\u7684\u7f16\u8bd1\u5668\u4f1a\u51fa\u73b0\u4e00\u4e9b\u62a5\u9519\uff0c\u56e0\u6b64\u6211\u5c06\u7248\u672c\u6362\u81f3\u4e86QT5.12.12\u4e0eMinGW7.2.0\u7f16\u8bd1\u5668<\/p>\n<p>\u5728\u672c\u6b21\u66f4\u65b0\u4e2d\u6dfb\u52a0\u4e86<br \/>\n&#8211; \u6ce8\u518c\u7801\u529f\u80fd\uff0c\u7528\u6237\u9700\u8981\u8f93\u5165\u7279\u5b9a\u7684\u6ce8\u518c\u7801\u624d\u80fd\u591f\u4f7f\u7528\u6b64\u6587\u672c\u7f16\u8f91\u5668<br \/>\n&#8211; \u67e5\u770b\u5386\u53f2\u8bb0\u5f55\u529f\u80fd\uff0c\u7528\u6237\u53ef\u5728\u6587\u4ef6\u680f\u67e5\u770b\u81ea\u5df1\u6700\u8fd1\u6253\u5f00\u7684\u6587\u4ef6\uff0c\u540c\u65f6\u53ef\u4ee5\u6e05\u9664\u5386\u53f2\u6253\u5f00\u8bb0\u5f55<br \/>\n&#8211; Base64\u7f16\u7801\u4e0e\u89e3\u7801\uff0c\u4f5c\u4e3a\u4e00\u540dCTFer\uff0c\u6211\u52a0\u4e0a\u4e86\u8fd9\u79cd\u5f88\u5e38\u89c1\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u540e\u7eed\u8ba1\u5212\u6dfb\u52a0\u66f4\u591a<\/p>\n","protected":false},"author":1,"featured_media":406,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c_qt"],"_links":{"self":[{"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":1,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":405,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions\/405"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/media\/406"}],"wp:attachment":[{"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/noobxiaomeng.top\/index.php\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}