摘要: Error opening terminal: xterm-256color vim ~/.bash_profile 添加内容: export TERMINFO=/usr/share/terminfoexport TERM=xterm-basic到.bash_profile文件 然后 source 阅读全文
posted @ 2021-11-09 13:45 出门必戴双肩包 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 先查看是否支持OpenSSL qDebug() << QStringLiteral("OpenSSL支持情况:") << QSslSocket::supportsSsl(); 查看支持OpenSSL版本 qDebug()<<"QSslSocket="<<QSslSocket::sslLibraryB 阅读全文
posted @ 2021-10-15 17:11 出门必戴双肩包 阅读(1152) 评论(0) 推荐(0) 编辑
摘要: 问题排查 我编译加入某个头文件后,提示错误:C2062:意外的类型"unsigned int"。经大佬排查后解决,现在记录他解决问题的思路。 首先注释此类中引用的几个头文件,没能定位问题。 然后到main.cpp 利用 #if 0 #else //声明可能有问题的类的实例化 #endif 排查,发现 阅读全文
posted @ 2021-08-13 09:49 出门必戴双肩包 阅读(1963) 评论(0) 推荐(0) 编辑
摘要: QMap、QHash键重复不再添加 如果键重复还需要添加,则用QMultiMap,或者用vector套pair 阅读全文
posted @ 2021-08-11 10:08 出门必戴双肩包 阅读(224) 评论(0) 推荐(0) 编辑
摘要: qt比较从数据库中取出的中文和界面上的中文,显示为不相等 都把它们打印出来后发现qt上的中文为乱码,所以是编码问题 界面字符加上QStringLiteral处理就好了 阅读全文
posted @ 2021-08-06 18:26 出门必戴双肩包 阅读(143) 评论(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 出门必戴双肩包 阅读(182) 评论(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 出门必戴双肩包 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 遍历QT界面下同种控件 阅读全文
posted @ 2021-07-16 09:40 出门必戴双肩包 阅读(359) 评论(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 出门必戴双肩包 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 回顾学习find和find_if, 网上查了一下资料,这里记录一下。 STL的find,find_if函数提供了一种对数组、STL容器进行查找的方法。使用该函数,需 #include <algorithm>我们查找一个list中的数据,通常用find(),例如: 1、findusing namesp 阅读全文
posted @ 2021-04-29 17:39 出门必戴双肩包 阅读(14246) 评论(0) 推荐(0) 编辑