摘要: void SideBar::setBtnVec(QVector<QPushButton*> btnVec, const char *name) { m_propertyName = name; m_btnVec = btnVec; for (int i = 0; i < m_btnVec.count 阅读全文
posted @ 2025-02-12 10:32 雾枫 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 原文链接:C++ Qt开发:Charts折线图绑定事件-腾讯云开发者社区-腾讯云// 设置图表的主题 m_chart->setTheme(QChart::ChartThemeBlueNcs); QLegend *legend = m_chart->legend(); legend->setAlign 阅读全文
posted @ 2025-01-01 21:20 雾枫 阅读(59) 评论(0) 推荐(0) 编辑
摘要: // 设置应用程序图标(窗口图标和任务栏图标) this->setWindowIcon(QIcon("./Icon/ReadADtool.ico")); // 从资源文件中加载图标 固定到任务栏上时的图标: 在pro文件添加如下指令: 设置rc文件内容: IDI_ICON1 ICON DISCARD 阅读全文
posted @ 2024-12-30 17:01 雾枫 阅读(22) 评论(0) 推荐(0) 编辑
摘要: void clearTableExceptHeaders() { int rowCount = tableWidget->rowCount(); int columnCount = tableWidget->columnCount(); // 清除所有单元格的内容 for (int row = 0; 阅读全文
posted @ 2024-09-11 11:11 雾枫 阅读(101) 评论(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 雾枫 阅读(57) 评论(0) 推荐(0) 编辑
摘要: bool DdrawCircleOnImage( const QString &inputImagePath, const QString &outputImagePath, QVector<QPoint> dotData ) { if ( inputImagePath.isEmpty() || o 阅读全文
posted @ 2024-08-08 19:16 雾枫 阅读(43) 评论(0) 推荐(0) 编辑
摘要: bool BasicDotChart::saveAsImage(const QString &path) { // 获取窗口的 QPixmap QPixmap pixmap = this->grab(); // 弹出保存文件对话框,选择保存位置和文件格式 QString filePath = pat 阅读全文
posted @ 2024-08-08 19:14 雾枫 阅读(103) 评论(0) 推荐(0) 编辑
摘要: RC_ICONS = $$PWD/res/app.ico 在pro文件中添加以上代码 阅读全文
posted @ 2024-08-05 15:26 雾枫 阅读(23) 评论(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 雾枫 阅读(117) 评论(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 雾枫 阅读(40) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示