会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
TOBESTRONGEST
博客园
首页
新随笔
联系
管理
订阅
2021年3月24日
QT出现H:\25_QSqlQueryModel\sqlquerymodel.cpp:3: error: undefined reference to `_imp___ZN14QSqlQueryModelC2EP7QObject'
摘要: 当Qt程序运行出现error: undefined reference to `_imp___ZN14QSqlQueryModelC2EP7QObject' 一般就是没有在.pro文件中包含“Qt += sql”这一模块
阅读全文
posted @ 2021-03-24 20:28 撑死算工伤吗
阅读(85)
评论(0)
推荐(0)
2021年3月12日
QML出现QQmlComponent: Component is not ready
摘要: 前提: 对QML工程下的qml.qrc下的资源创建了文件夹分类,在一个qml文件中使用另一个非本文件夹下的qml文件,已经导入该路径的文件夹,但时候在项目中直接使用自定义的QMl组件的时候,出现错误:QQmlComponent: Component is not ready(组件没有加载好) 原因:
阅读全文
posted @ 2021-03-12 12:02 撑死算工伤吗
阅读(2586)
评论(0)
推荐(0)
2021年3月11日
查看QT可用的数据插件
摘要: 1、创建一个Widget Application 2、.pro文件中加入 QT += sql QT += widgets 3、.cpp文件 #include <QApplication> #include <QSqlDatabase> #include <QDebug> #include <QStr
阅读全文
posted @ 2021-03-11 16:10 撑死算工伤吗
阅读(107)
评论(0)
推荐(0)
2021年3月10日
QTQT编译出错——QT未链接sql数据库模块undefined reference to '_imp__ZN12QSqlDatabaseC1Ev'
摘要: 在.pro文件中添加: QT += sql 参考:https://blog.csdn.net/sunny_hu92/article/details/86010124
阅读全文
posted @ 2021-03-10 17:46 撑死算工伤吗
阅读(313)
评论(0)
推荐(0)
2021年3月5日
QML出现QML Flow: Cannot specify anchors for items inside Flow. Flow will not function.
摘要: 实现的功能大概是这样的: 1、一个Rectangle主窗口,左上角有一个文本Text 2、主窗口中有一个Rectangle停靠在主窗口的最右边,高与主窗口相同,宽比主窗口小 3、定义了一个Flow填充(填满)在停靠的Rectangle中 4、Flow中有一系列的小Rectangle,按照Qt.Top
阅读全文
posted @ 2021-03-05 16:28 撑死算工伤吗
阅读(544)
评论(0)
推荐(0)
2021年3月3日
QML中加载不同的图片的格式
摘要: 1、加载本地图片——采用绝对路径的方式 //需要在绝对路径前加上:file:/// >如果不加会出现QML Image: Protocol "h" is unknown盘符不认识的情况 image.source = "file:///H:/QT5/Qt Quick/images/add.png";
阅读全文
posted @ 2021-03-03 15:26 撑死算工伤吗
阅读(842)
评论(0)
推荐(0)
QML出现Signal QQmlEngine::quit() emitted, but no receivers connected to handle it.
摘要: 两个文件的代码如下,实现的功能很简单:点击Rectangle窗口中的Quit按钮,窗口关闭 //main.cpp #include <QGuiApplication> #include <QQuickView> int main(int argc, char *argv[]) { QGuiAppli
阅读全文
posted @ 2021-03-03 11:59 撑死算工伤吗
阅读(391)
评论(0)
推荐(0)
2021年3月2日
QML出现error: Expected token `numeric literal'
摘要: 简单地在界面上画了两个Rectangle,运行出来,提示 H:\01_helloQtQuick\main0.qml:114: error: Expected token `numeric literal' 最后发现:main.cpp中设置source时路径写错,应当有三个“/”,而不是两个: vie
阅读全文
posted @ 2021-03-02 15:17 撑死算工伤吗
阅读(1485)
评论(0)
推荐(0)
QT出现QML debugging is enabled. Only use this in a safe environment.
摘要: 为什么会有这个警告? 由于在Qt5以上版本默认开启QML调试器造成的。用于告知用户,这将打开一个到运行QML的Javascript解释器的端口,以便从中获得调试输出。显然,这会造成一个安全漏洞,所以在不安全的地方使用时应该关闭它(在释放运行时自动关闭)。这个警告是为了提醒你这一点。 注意 Qt4默认
阅读全文
posted @ 2021-03-02 08:33 撑死算工伤吗
阅读(1329)
评论(0)
推荐(0)
QT出现Error: Function.prototype.connect: target is not a function
摘要: import QtQuick 2.12//Text等 import QtQuick.Window 2.12 import QtQuick.Controls 1.3//button等组件 //信号槽 Window { id: win; visible: true//必须要写才能显示 width: 64
阅读全文
posted @ 2021-03-02 08:31 撑死算工伤吗
阅读(624)
评论(0)
推荐(0)
下一页
公告