
Qt
robator
这个作者很懒,什么都没留下…
展开
-
Qt creator 中文显示问题(常量中有换行符或中文显示乱码)
环境是VS2015+Qt Creator(Based on qt 5.13.1)不要使用QStringLiteral()QString::fromLocal8Bit()原创 2020-10-31 19:04:22 · 256 阅读 · 0 评论 -
QObject::connect: No such signal QGraphicsView::mouseMovePoint(QPoint) in ***
使用Qt定义了一个类:class QWGraphicsView : public QGraphicsView{ public: QWGraphicsView(QWidget *parent=0);protected: void mouseMoveEvent(QMouseEvent *event) ; void mousePressEvent...原创 2020-02-02 15:24:51 · 1118 阅读 · 6 评论 -
Qt ToolBar工具栏里同时显示图标和文字
Qt默认情况下(Qt版本5.13),工具栏添加Action后,只显示Action的图标,如下图所示这种界面不方便操作,最好在工具栏添加文字,添加文字方式(在构造函数中添加)为: ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);此种方式为文字显示在图标右侧,如图所示:ui->tool...原创 2019-12-20 15:51:11 · 11047 阅读 · 7 评论 -
calling '**' with incomplete return type
学习Qt,有一行代码报错: QTextBlock textLine=doc->findBlockByNumber(i);报错内容为:error: calling 'findBlockByNumber' with incomplete return type 'QTextBlock‘error: variable has incomplete type 'QTextBlock...原创 2019-12-14 15:54:02 · 7802 阅读 · 3 评论