上一页 1 2 3 4 5 6 7 ··· 15 下一页

2021年8月6日

C++ 真随机

摘要: //随机数的种子这样1、 #include <ctime>2、 srand( (unsigned int)time(NULL) );3、 rand()%(GAME_WIDTH - m_enemys[i].m_Rect.width()); 阅读全文

posted @ 2021-08-06 15:20 袁佳佳 阅读(148) 评论(0) 推荐(0) 编辑

2021年6月29日

C++ 给予QCustomPlot的编写

摘要: #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { srand(QDat 阅读全文

posted @ 2021-06-29 09:22 袁佳佳 阅读(509) 评论(0) 推荐(0) 编辑

2021年6月23日

QT QCustmPlot把折线图生成PDF

摘要: void MainWindow::on_actionSave_Document_triggered() { QString fileName = QFileDialog::getSaveFileName(this, "Save document...", qApp->applicationDirPa 阅读全文

posted @ 2021-06-23 09:46 袁佳佳 阅读(165) 评论(0) 推荐(0) 编辑

2021年6月22日

QT 向窗体拖动csv文件读取打开数据

摘要: add.h #ifndef ADD_H #define ADD_H #include <QWidget> #include <QDragEnterEvent> #include <QTextStream> #include <QMimeData> #include <QDebug> #include 阅读全文

posted @ 2021-06-22 11:46 袁佳佳 阅读(201) 评论(0) 推荐(0) 编辑

2021年6月20日

QT 计算器

摘要: void Widget::on_pushButton_clicked() { QString sendStr = ui->textEdit->toPlainText(); qDebug()<<sendStr; for(int i = 0; i < sendStr.length(); i ++){ i 阅读全文

posted @ 2021-06-20 18:07 袁佳佳 阅读(329) 评论(0) 推荐(0) 编辑

Qt QString 包含某类型

摘要: QString = "dsadsad-ddd" if (sendStr.contains("-")) { qDebug()<<"如果包含"; } 阅读全文

posted @ 2021-06-20 17:53 袁佳佳 阅读(185) 评论(0) 推荐(0) 编辑

QT int转QString

摘要: int sum = 10QString::number(sum) 阅读全文

posted @ 2021-06-20 17:51 袁佳佳 阅读(675) 评论(0) 推荐(0) 编辑

textEdit提取 文本内容

摘要: QString sendStr = ui->textEdit->toPlainText(); 阅读全文

posted @ 2021-06-20 16:33 袁佳佳 阅读(518) 评论(0) 推荐(0) 编辑

2021年6月7日

QList操作

摘要: //void s_Widget:: model() //{ // query = sql->query; // query->exec("select 型号 from FRP_attr"); // QList<QByteArray> list_model; //设置一个list(QByteArray 阅读全文

posted @ 2021-06-07 12:37 袁佳佳 阅读(367) 评论(0) 推荐(0) 编辑

2021年6月3日

添加QCustomPlot图表到 tabwidget 的tab页

摘要: //初始化的时候、 添加QCustomPlot在tabwidget的标签当中。 //1、新建QCustomPlot指针对象 继承当前的widget对象 QCustomPlot *widget_qc = new QCustomPlot(this); //添加tab页面到 tabWidget当中、起名折 阅读全文

posted @ 2021-06-03 10:35 袁佳佳 阅读(224) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 15 下一页

导航