Qt
Sunny_Hz
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用setStyleSheet设置样式无效解决办法
子类化QWidget后,遇到问题使用setStyleSheet设置样式没起作用,解决办法在子类中重写paintEvent#include <QPainter>#include <QStyleOption>void MyWidget::paintEvent(QPaintEvent *e){ QStyleOption opt; opt.init(this); QPainter p(this); style()->drawPrimit原创 2022-04-14 17:38:38 · 1085 阅读 · 0 评论 -
Qt QCombobox信号槽连接时使用Lambda表达式失败
如题,当在connect当中使用Lambda表达式时,要注意前面使用的信号是否有多个重载,这时需要处理信号重载问题:1.可用static_case; 2.使用QOverload::of错误的示例:connect(comboBoxDicomPrinter, SIGNAL(QComboBox::currentTextChanged(const QString&)), [=](const QString& str){ QString sss = str; });编译会提...原创 2021-11-04 10:47:11 · 2554 阅读 · 0 评论 -
error C2872: “byte”: 不明确的符号(Win10 Qt环境下编译)
其实这个错误是由我工程里一个头文件写了“using namespace std;”所导致的,去掉这句成功编译,因为在那个头文件里我并没有使用标准模板库的类。原创 2021-08-11 18:25:20 · 6589 阅读 · 1 评论
分享