【Qt】Qt项目打包 在qt creator中使用Release编译;然后打开qt命令行工具,注意不是windows自带的命令行工具,如下所示;切换到Release路径下,示例如下:cd /d D:/xxx/xxx/release在qt命令行中输入下列命令,xxx替换成你自己的exe名字:windeployqt xxx.exe如果是qt quick项目,还需要输入下列命令,路径需要替换成自己.
【Qt】错误 MSB4175 缺失Microsoft.Build.Tasks.Core.dll 可能是之前安装了其它版本qt导致;删除编辑缓存C:\Users\你的用户名字\AppData\Local\QtMsBuild
Qt信号和槽的连接方法 官方文档查看手册可以看出,如果想要把信号和槽函数联系起来,通过connect()方法即可;connect()的参数:sender:产生信号的对象signal:信号的名字method:槽函数示例UdpReceiver::UdpReceiver(QObject *p) : QObject(p){ //udp通信 uSocket = new QUdpSocket; //绑定ip和端口号 uSocket->bind(QHostAddress("127.0.0.1")
MyBatis高级结果映射 官网的示例<resultMap id="detailedBlogResultMap" type="Blog"> <constructor> <idArg column="blog_id" javaType="int"/> </constructor> <result property="title" column="blog_title"/> <association property="author" javaTy
【InstallShield】入门介绍 主要参考InstallShield 2021 Help LibraryInstallation FundamentalsAn installation is divided into three levels: products, features, and components. The following diagram illustrates this hierarchy:A product is the highest level of organization in an instal.
【MySQL】5秒插入100万行数据 数据库CREATE TABLE `product` ( `pid` int NOT NULL AUTO_INCREMENT, `pname` varchar(64) DEFAULT NULL COMMENT '商品名', `price` double DEFAULT NULL COMMENT '价格', PRIMARY KEY (`pid`)) ENGINE=InnoDB AUTO_INCREMENT=1048561 DEFAULT CHARSET=utf8mb4 COLLATE=utf
MyBatis-Plus 多表查询 MP提供了大量单表查询的方法,但是没有多表的操作,所以涉及到多表的查询时,需要我们自己实现思路1因为MP是基于MyBatis实现,我们可以使用MyBatis的结果映射来做,下面是一个官网的例子https://mybatis.org/mybatis-3/zh/sqlmap-xml.html#Result_Maps<!-- 非常复杂的语句 --><select id="selectBlogDetails" resultMap="detailedBlogResultMap"&g.
【Qt】时间戳 C++QDateTime::currentMSecsSinceEpoch()qmlqml中可以使用js的方法来获取时间戳function getTimeStamp(){ return Date.now() }
【Qt】递归读取Json 相关的类QJsonObject,顾名思义,就是Json对象QJsonArray,Json数组QJsonDocument,用于和QByteArray相互转换;QJsonValue,可以从QJsonObject中去key拿到对应的value,类型就是QJsonValue,可以转成实际的类型,如:QString,QJsonObject,QByteArray等;上述说明均是来自于Qt官方文档,官方文档中有详细的API描述,也可以在Qt Creator查看类的声明;Demo从一个文件中读取一个嵌套
【Qt】Base64编解码 Qt#include <QCoreApplication>#include <QByteArray>#include <QDebug>int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); QString temp = QStringLiteral("Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,因此J
【Qt】QML自定义控件 MyInputText.qml控件的宽度和高度可以自己设置,右侧的输入框的宽度会根据左侧文本的宽度自动设置import QtQuick 2.14import QtQuick.Controls 2.14import QtQuick.Layouts 1.14Rectangle{ id: root width: 230 height: 30 //固定的文本 property var labelText: "labelText" //用户输入的
【Qt】qml TreeView的简单使用 主要参考了官方demo,Simple Tree Model Example借鉴了https://blog.csdn.net/shado_walker/article/details/56495059中roleNames()函数的写法由于官方的demo是基于qt widgets的,我的目的是在qml中使用TreeView,所以将代码记录如下工程结构.pro文件QT += quick core qml widgets guiCONFIG += c++11# The following.
Editable Tree Model Example This example shows how to implement a simple item-based tree model that can be used with other classes the model/view framework.这个例子展示了如何实现一个简单的基于项目的树模型,它可以与模型/视图框架中的其他类一起使用。The model supports editable items, custom headers, and the ability to insert .