随笔分类 -  QT

摘要:效果 代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QtCharts> //必须这么设置 QT_CHARTS_USE_NAMESPACE //使用宏定=-0义 na 阅读全文
posted @ 2022-06-05 12:26 蘑菇王国大聪明 阅读(584) 评论(0) 推荐(0) 编辑
摘要:widget.h #ifndef WIDGET_H #define WIDGET_H #include <QWidget> namespace Ui { class Widget; } class Widget : public QWidget { Q_OBJECT private: void my 阅读全文
posted @ 2022-06-05 12:15 蘑菇王国大聪明 阅读(164) 评论(0) 推荐(0) 编辑
摘要:效果 代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QSerialPort> #include <QSerialPortInfo> #include <QPushB 阅读全文
posted @ 2022-06-05 11:56 蘑菇王国大聪明 阅读(56) 评论(0) 推荐(0) 编辑
摘要:mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QPushButton> #include <QFile> class MainWindow : public QMainW 阅读全文
posted @ 2022-06-05 10:02 蘑菇王国大聪明 阅读(56) 评论(0) 推荐(0) 编辑
摘要:效果 代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QSqlDatabase> #include <QSqlQuery> #include <QMainWindow> #include <QLabel> #in 阅读全文
posted @ 2022-06-05 09:45 蘑菇王国大聪明 阅读(287) 评论(0) 推荐(0) 编辑
摘要:效果 代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QSqlDatabase> #include <QSqlQuery> #include <QMainWindow> #include <QDialog> #i 阅读全文
posted @ 2022-06-05 09:41 蘑菇王国大聪明 阅读(83) 评论(0) 推荐(0) 编辑
摘要:效果 代码 main.cpp #include "mainwindow.h" #include <QApplication> #include <QFile> int main(int argc, char *argv[]) { QApplication a(argc, argv); /* 指定文件 阅读全文
posted @ 2022-06-05 09:27 蘑菇王国大聪明 阅读(46) 评论(0) 推荐(0) 编辑
摘要:效果 代码 main.cpp #include "mainwindow.h" #include <QApplication> #include <QFile> int main(int argc, char *argv[]) { QApplication a(argc, argv); /* 指定文件 阅读全文
posted @ 2022-06-05 09:23 蘑菇王国大聪明 阅读(60) 评论(0) 推荐(0) 编辑
摘要:代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QNetworkAccessManager> #include <QNetworkReply> #include <Q 阅读全文
posted @ 2022-06-04 19:53 蘑菇王国大聪明 阅读(115) 评论(0) 推荐(0) 编辑
摘要:单播和广播 代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QUdpSocket> #include <QVBoxLayout> #include <QHBoxLay 阅读全文
posted @ 2022-06-04 19:36 蘑菇王国大聪明 阅读(106) 评论(0) 推荐(0) 编辑
摘要:代码 TCP服务端 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QTcpServer> #include <QTcpSocket> #include <QVBoxLay 阅读全文
posted @ 2022-06-04 18:40 蘑菇王国大聪明 阅读(37) 评论(0) 推荐(0) 编辑
摘要:代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QPushButton> #include <QTextBrowser> #include <QVBoxLayout> 阅读全文
posted @ 2022-06-04 17:54 蘑菇王国大聪明 阅读(89) 评论(0) 推荐(0) 编辑
摘要:继承QThread mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QThread> #include <QDebug> #include <QPushButton> QT 阅读全文
posted @ 2022-06-03 20:47 蘑菇王国大聪明 阅读(21) 评论(0) 推荐(0) 编辑
摘要:界面 代码 qwcomboboxdelegate.h #ifndef QWCOMBOBOXDELEGATE_H #define QWCOMBOBOXDELEGATE_H #include <QItemDelegate> class QWComboBoxDelegate : public QItemD 阅读全文
posted @ 2022-06-02 18:44 蘑菇王国大聪明 阅读(79) 评论(0) 推荐(0) 编辑
摘要:界面 代码 mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMain 阅读全文
posted @ 2022-06-02 18:39 蘑菇王国大聪明 阅读(33) 评论(0) 推荐(0) 编辑
摘要:界面 登录窗口 主界面 代码 qdlglogin.h #ifndef QDLGLOGIN_H #define QDLGLOGIN_H #include <QDialog> namespace Ui { class dlgLogin; } class QDlgLogin : public QDialo 阅读全文
posted @ 2022-06-02 11:45 蘑菇王国大聪明 阅读(56) 评论(0) 推荐(0) 编辑
摘要:界面 代码 qwmainwindow.h #ifndef QWMAINWINDOW_H #define QWMAINWINDOW_H #include <QMainWindow> #include "qformdoc.h" #include <QMdiSubWindow> namespace Ui 阅读全文
posted @ 2022-06-02 11:00 蘑菇王国大聪明 阅读(89) 评论(0) 推荐(0) 编辑
摘要:界面 代码 qwmainwindow.h #ifndef QWMAINWINDOW_H #define QWMAINWINDOW_H #include <QMainWindow> #include "qformdoc.h" #include "qformtable.h" namespace Ui { 阅读全文
posted @ 2022-06-01 20:34 蘑菇王国大聪明 阅读(81) 评论(0) 推荐(0) 编辑
摘要:界面 代码 dialog.cpp #include "dialog.h" #include "ui_dialog.h" #include <QFileDialog> #include <QColorDialog> #include <QFontDialog> #include <QInputDial 阅读全文
posted @ 2022-06-01 11:47 蘑菇王国大聪明 阅读(181) 评论(0) 推荐(0) 编辑
摘要:界面 代码 qperson.h #ifndef QPERSON_H #define QPERSON_H #include <QObject> class QPerson : public QObject { Q_OBJECT Q_CLASSINFO("author", "Shao ZHeming") 阅读全文
posted @ 2022-05-30 10:51 蘑菇王国大聪明 阅读(42) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示