分类目录:QT

以下是分类 QT 下的所有文章

Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

QT 加载字体

加载本地字体 先将字体加入资源文件,然后 QFontDatabase fontDatabase; if (fontDatabase.addApplicationFont(“:/images/FontAwesome.ttf”) == -1) qWarning() << “Failed to load font”; 然后可以在QM……


Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

QT QML一些技术积累

qml C++交互 QML中访问C++成员及函数. 很简单,只要C++类是继承QObject, 然后使用Q_PROPERTY与Q_INVOKABLE来定义函数,就可以直接在QML中调用.Q_PROPERTY与Q_INVOKABLE的用法在网上很多,并且简单,这里不详细描述. C++ 调用 QML函数 C++直接访问QML中变量及函数稍麻烦……


Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

qml Canvas绘制简单图形

简单图形 使用内置的Rectangle不透明,并且不能指定方向圆角.所以打算自已画框 简单矩形 Canvas{ id:pen x:0 y:0 width: 50 height: 50 visible: true onPaint: {//绘图事件的响应 var ctx = getContext(‘2d’); ctx.lineWidth = ……


Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

QT json

先了解概念 使用{ … }可以叫做一个json对像,使用QJsonObject这个类来处理 使用[ … ]可以叫做一个json数组,使用QJsonArray这个类来处理 QJsonDocument 保存/初始化 json对像, QJsonValue 保存json项目值 解析json 假如有以下QByteArray字符串jsonst……


Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97

QML学习笔记一

全部在代码里.. import QtQuick 2.6 import QtQuick.Window 2.2 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.3 ApplicationWindow { // 顶层会话窗口,不同于Window, ApplicationWindow可以支……


Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97