commit 351420f37b5fd3709d116618d4e251ae170ad4ed Author: zcy <290198252@qq.com> Date: Thu Nov 9 00:15:33 2023 +0800 no message diff --git a/485_ana.pro b/485_ana.pro new file mode 100644 index 0000000..8579b4f --- /dev/null +++ b/485_ana.pro @@ -0,0 +1,27 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +libs += "d://untitled.lib" \ + "G:\\project\\QMacVisual\\QMainPro\\QMacVisual\\lib\\debug\\opencv_world460d.lib" + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.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/485_ana.pro.user b/485_ana.pro.user new file mode 100644 index 0000000..c27accd --- /dev/null +++ b/485_ana.pro.user @@ -0,0 +1,426 @@ + + + + + + EnvironmentId + {2f8149c7-6065-4889-8af2-fdde6a16f5dc} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + GBK + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 6 + false + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 6.5.3 MSVC2019 64bit + Desktop Qt 6.5.3 MSVC2019 64bit + qt.qt6.653.win64_msvc2019_64_kit + 0 + 0 + 0 + + 0 + D:\project\build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Debug + D:/project/build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:\project\build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Release + D:/project/build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + D:\project\build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Profile + D:/project/build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + false + Qt4ProjectManager.Qt4RunConfiguration:D:/project/485_ana/485_ana.pro + D:/project/485_ana/485_ana.pro + true + true + true + D:/project/build-485_ana-Desktop_Qt_6_5_3_MSVC2019_64bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop + Replacement for "Desktop Qt 5.12.12 MSVC2017 64bit" + Replacement for "Desktop Qt 5.12.12 MSVC2017 64bit" + qt.qt5.51212.win64_msvc2017_64_kit + 0 + 0 + 0 + + 0 + D:\project\build-485_ana-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug + D:/project/build-485_ana-Desktop_Qt_5_12_12_MSVC2017_64bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:\project\build-485_ana-Desktop_Qt_5_12_12_MSVC2017_64bit-Release + D:/project/build-485_ana-Desktop_Qt_5_12_12_MSVC2017_64bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + D:\project\build-485_ana-Desktop_Qt_5_12_12_MSVC2017_64bit-Profile + D:/project/build-485_ana-Desktop_Qt_5_12_12_MSVC2017_64bit-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + false + Qt4ProjectManager.Qt4RunConfiguration:D:/project/485_ana/485_ana.pro + D:/project/485_ana/485_ana.pro + true + true + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..e9562cc --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/mainwindow.cpp b/mainwindow.cpp new file mode 100644 index 0000000..9dec1ec --- /dev/null +++ b/mainwindow.cpp @@ -0,0 +1,56 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include +#include +#include +#include + +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# pragma execution_character_set("utf-8") +#endif + + +class MainInterface +{ +public: + virtual ~MainInterface(){} + virtual QString name() = 0; + virtual QString information() = 0; +}; + +#define MainInterface_iid "com.Interface.MainInterface" +Q_DECLARE_INTERFACE(MainInterface, MainInterface_iid) + + + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::MainWindow) +{ + ui->setupUi(this); + QDir pluginsDir = QDir(qApp->applicationDirPath()); + if (!pluginsDir.cd("Plugins")) return; + QStringList filters; + filters << "*.dll"; //Զָʽߵʽ + pluginsDir.setFilter(QDir::Files | QDir::NoSymLinks); //͹ֻΪļʽ + pluginsDir.setNameFilters(filters); //ļƹ + QStringList ap; + QPluginLoader pluginLoader("d://untitled.dll"); + + QObject* plugin = pluginLoader.instance(); + + auto treeInterface = qobject_cast(plugin); + if (treeInterface) { + //زTree + qDebug()<information(); + } + this->setWindowTitle("ss"); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + diff --git a/mainwindow.h b/mainwindow.h new file mode 100644 index 0000000..6845742 --- /dev/null +++ b/mainwindow.h @@ -0,0 +1,21 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui new file mode 100644 index 0000000..b239da1 --- /dev/null +++ b/mainwindow.ui @@ -0,0 +1,125 @@ + + + MainWindow + + + + 0 + 0 + 1068 + 658 + + + + MainWindow + + + + + + + + + + 15 + + + + 串口: + + + + + + + + 15 + + + + + + + + + 15 + + + + 波特率: + + + + + + + + 15 + + + + + + + + + 15 + + + + 打开 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 解析: + + + + + + + + + + 原文: + + + + + + + + + + + + 0 + 0 + 1068 + 25 + + + + + + + +