会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
朱小勇
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
55
56
57
58
59
60
61
62
63
···
133
下一页
2020年8月30日
QRoundProgressBar
摘要: 1、官网 https://sourceforge.net/projects/qroundprogressbar/ 2、下载并加入到工程 3、在ui里拖一个widget,提升为QRoundProgressBar 4、直接使用 ui->round_1->setFormat("%v"); ui->roun
阅读全文
posted @ 2020-08-30 00:15 朱小勇
阅读(830)
评论(0)
推荐(0)
2020年8月29日
QChartView饼图
摘要: 1、环境准备 .pro里: QT += charts 头文件: #include <QtCharts> 2、在mainwindow.h里定义饼图变量 QPieSeries *series; 3、mainwindow.cpp series = new QPieSeries(); series->app
阅读全文
posted @ 2020-08-29 21:27 朱小勇
阅读(1491)
评论(0)
推荐(1)
2020年8月21日
qml页面指示器
摘要: 1、效果 2、与swipview一起使用 //index提示器 PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: parent.botto
阅读全文
posted @ 2020-08-21 12:50 朱小勇
阅读(414)
评论(0)
推荐(0)
QML-悬浮框
摘要: 1、效果 2、自定义路径qml import QtQuick 2.0 Item { property point startPoint: Qt.point(0, 0) property point endPoint: Qt.point(0, 0) property var lineColor: "#
阅读全文
posted @ 2020-08-21 12:44 朱小勇
阅读(883)
评论(0)
推荐(0)
QML解析json
摘要: 1、简单的json MouseArea { anchors.fill: parent; onClicked: { var json = '{"result":true, "count":42}'; var obj = JSON.parse(json); console.log(obj.count);
阅读全文
posted @ 2020-08-21 11:33 朱小勇
阅读(2975)
评论(0)
推荐(0)
2020年8月9日
QObject::QObject(const QObject&)' is private Q_DISABLE_COPY(QObject)
摘要: QObject的拷贝构造函数是私有的,当把其子类放入容器时无法完成构造其副本。 如下代码便会报错: Mydata data("item1", "red"); QList<QObject> datalist; datalist.append(data); 解决,以指针形式存储: QList<QObje
阅读全文
posted @ 2020-08-09 00:50 朱小勇
阅读(526)
评论(0)
推荐(0)
2020年8月8日
C++传递数据到QML-setContextProperty以及结合listview使用
摘要: 一、适用情况 在C++里将数据生成,然后将这个数据设置为qml的上下文属性,在qml里就能使用了 二、传递基础类型 1、main.cpp QQuickWidget *m_widget = new QQuickWidget(this); m_widget->setGeometry(0, 0, this
阅读全文
posted @ 2020-08-08 23:03 朱小勇
阅读(7335)
评论(0)
推荐(0)
2020年8月7日
QML设置鼠标样式
摘要: MouseArea { anchors.fill: parent; hoverEnabled: true; cursorShape: (containsMouse? (pressed? Qt.ClosedHandCursor: Qt.OpenHandCursor): Qt.ArrowCursor);
阅读全文
posted @ 2020-08-07 17:39 朱小勇
阅读(1043)
评论(0)
推荐(0)
自定义面包屑导航
摘要: 1、代码 import QtQuick 2.0 import QtQuick.Controls 2.0 Rectangle { id:root; color: "#19192C"; property int rect_width: 80; property int rect_height: 20;
阅读全文
posted @ 2020-08-07 16:42 朱小勇
阅读(682)
评论(0)
推荐(0)
JS-语法
摘要: 1、全等于 2、不等于 !==
阅读全文
posted @ 2020-08-07 14:56 朱小勇
阅读(108)
评论(0)
推荐(0)
上一页
1
···
55
56
57
58
59
60
61
62
63
···
133
下一页
公告