随笔分类 -  QT开发

摘要:qt程序在linux下生成core dump 阅读全文
posted @ 2022-08-19 18:06 出门必戴双肩包 阅读(1612) 评论(0) 推荐(0)
摘要:QT在linux下编译出现Unable to create a debugging engine的错误后,我在Tools->options下的Build&Run中的Debuggers里看到我的Debuggers都为空,这样操作后,Unable to create a debugging engine问题就此解决! 阅读全文
posted @ 2022-06-21 14:30 出门必戴双肩包 阅读(3227) 评论(0) 推荐(0)
摘要:先查看是否支持OpenSSL qDebug() << QStringLiteral("OpenSSL支持情况:") << QSslSocket::supportsSsl(); 查看支持OpenSSL版本 qDebug()<<"QSslSocket="<<QSslSocket::sslLibraryB 阅读全文
posted @ 2021-10-15 17:11 出门必戴双肩包 阅读(1975) 评论(0) 推荐(0)
摘要:问题排查 我编译加入某个头文件后,提示错误:C2062:意外的类型"unsigned int"。经大佬排查后解决,现在记录他解决问题的思路。 首先注释此类中引用的几个头文件,没能定位问题。 然后到main.cpp 利用 #if 0 #else //声明可能有问题的类的实例化 #endif 排查,发现 阅读全文
posted @ 2021-08-13 09:49 出门必戴双肩包 阅读(2645) 评论(0) 推荐(0)
摘要:QMap、QHash键重复不再添加 如果键重复还需要添加,则用QMultiMap,或者用vector套pair 阅读全文
posted @ 2021-08-11 10:08 出门必戴双肩包 阅读(246) 评论(0) 推荐(0)
摘要:pro文件加上以下字符,指定翻译文件: TRANSLATIONS = resource/zh_CN.ts \ resource/en_US.ts 重载changeEvent事件: protected: void changeEvent(QEvent *event) Q_DECL_OVERRIDE; 阅读全文
posted @ 2021-08-06 11:07 出门必戴双肩包 阅读(204) 评论(0) 推荐(0)
摘要:列表查找 struct先重载==号 struct Department { int Id; QString Name; QString Telephone; QString Contacts; bool Department::operator==(const Department &rhs) co 阅读全文
posted @ 2021-07-16 09:59 出门必戴双肩包 阅读(41) 评论(0) 推荐(0)
摘要:qt QComBox绑定对象列表依靠的是QVariant 绑定数据到UI for (QVector<Department>::const_iterator it=department.constBegin(); it!=department.constEnd(); ++it) { ui->depar 阅读全文
posted @ 2021-05-14 17:53 出门必戴双肩包 阅读(620) 评论(0) 推荐(0)
摘要:QTableView增加QPushButton、QToolButton等控件: QToolButton *EditBtn=new QToolButton(); EditBtn->setIcon(QIcon(":/Icon/edit.png")); EditBtn->setIconSize(QSize 阅读全文
posted @ 2021-04-28 17:26 出门必戴双肩包 阅读(2486) 评论(0) 推荐(0)
摘要:在/etc/profile末尾增加两句 export XDG_RUNTIME_DIR=/usr/lib/ export RUNLEVEL=3 然后刷新全局变量 source /etc/profile 则可 阅读全文
posted @ 2021-02-25 16:02 出门必戴双肩包 阅读(20694) 评论(2) 推荐(0)
摘要:error while loading shared libraries:libQt5SerialPort.so 阅读全文
posted @ 2021-02-24 17:33 出门必戴双肩包 阅读(6263) 评论(0) 推荐(1)
摘要:需求 需要不同界面同样的位置有上下的公共部分 分解 在WPF中我亦接触到需要这样做的程序。在wpf中我将上下公共部分作为界面基类,其它界面都继承这个基类。我用qt准备定义一个stackedpanel,所有界面在stackedpanel中跳转,这样即可实现上下部分为公共共有部分。 代码实现 1、在Ma 阅读全文
posted @ 2020-12-28 16:04 出门必戴双肩包 阅读(450) 评论(0) 推荐(0)