摘要: void clearTableExceptHeaders() { int rowCount = tableWidget->rowCount(); int columnCount = tableWidget->columnCount(); // 清除所有单元格的内容 for (int row = 0; 阅读全文
posted @ 2024-09-11 11:11 雾枫 阅读(4) 评论(0) 推荐(0) 编辑
摘要: bool SqliteDbManager::insertData(const QString& sql) { // 开启事务 if (!m_db.transaction()) { qDebug() << "无法启动事务:" << m_db.lastError().text(); return fal 阅读全文
posted @ 2024-08-14 11:52 雾枫 阅读(5) 评论(0) 推荐(0) 编辑
摘要: bool DdrawCircleOnImage( const QString &inputImagePath, const QString &outputImagePath, QVector<QPoint> dotData ) { if ( inputImagePath.isEmpty() || o 阅读全文
posted @ 2024-08-08 19:16 雾枫 阅读(1) 评论(0) 推荐(0) 编辑
摘要: bool BasicDotChart::saveAsImage(const QString &path) { // 获取窗口的 QPixmap QPixmap pixmap = this->grab(); // 弹出保存文件对话框,选择保存位置和文件格式 QString filePath = pat 阅读全文
posted @ 2024-08-08 19:14 雾枫 阅读(18) 评论(0) 推荐(0) 编辑
摘要: RC_ICONS = $$PWD/res/app.ico 在pro文件中添加以上代码 阅读全文
posted @ 2024-08-05 15:26 雾枫 阅读(3) 评论(0) 推荐(0) 编辑
摘要: bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, long *result) { Q_UNUSED(result); Q_UNUSED(eventType); MSG* pMsg = reinterpre 阅读全文
posted @ 2024-07-26 10:55 雾枫 阅读(19) 评论(0) 推荐(0) 编辑
摘要: QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 # You can make your code fail to compile if it uses deprecated APIs. # 阅读全文
posted @ 2024-07-23 17:34 雾枫 阅读(3) 评论(0) 推荐(0) 编辑
摘要: // 添加一个垂直方向的分割线 QFrame *line = new QFrame(); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); m_mainLayout->addWidget(line); 阅读全文
posted @ 2024-07-23 13:49 雾枫 阅读(16) 评论(0) 推荐(0) 编辑
摘要: void CaliTestMain::onLogMessage(const QString &logmess, QColor color) { QString mess = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss :") 阅读全文
posted @ 2024-07-18 18:06 雾枫 阅读(10) 评论(0) 推荐(0) 编辑