上一页 1 ··· 86 87 88 89 90 91 92 93 94 ··· 134 下一页
摘要: 1、#include <QScreen>2、 阅读全文
posted @ 2018-08-08 16:32 朱小勇 阅读(266) 评论(0) 推荐(0)
摘要: ApplicationWindow需要导入QtQuick.Controls Window需要导入QtQuick.Window 。 默认不可见,需要设置visible:true才可见。 主要区别就是ApplicationWindow提供了简单的方式创建程序窗口,因为其有属性menuBar、toolBa 阅读全文
posted @ 2018-08-07 17:06 朱小勇 阅读(3619) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-08-07 15:05 朱小勇 阅读(1442) 评论(0) 推荐(0)
摘要: 1、格式化代码 Ctrl+Alt+L 阅读全文
posted @ 2018-08-07 15:04 朱小勇 阅读(131) 评论(0) 推荐(0)
摘要: 在活动上面创建了两个按钮,在Design上看上去是两个按钮分开的,run一下,按钮就重合在一起了,而且一直报错,这个时候再去看一下Design,两个按钮重在一块,只显示一个按钮。如下图: button标注的是红色,这个报错意思是:组件没有锁定,重合了 解决方法如下: 在Design中,对着活动点击右 阅读全文
posted @ 2018-08-07 14:28 朱小勇 阅读(6291) 评论(0) 推荐(0)
摘要: 1、使用的是Component+自定义信号+Connections 2、在任意地方定义信号 阅读全文
posted @ 2018-08-06 20:07 朱小勇 阅读(389) 评论(0) 推荐(0)
摘要: 1、例子1,简单使用Connections import QtQuick 2.6 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 Window { visible: true width: 640 height: 480 title: qs 阅读全文
posted @ 2018-08-06 17:10 朱小勇 阅读(5731) 评论(0) 推荐(0)
摘要: 2、AnchorLine 上面的AnchorLine就是某一个Item的top、bottom...... 阅读全文
posted @ 2018-08-06 16:56 朱小勇 阅读(954) 评论(0) 推荐(0)
摘要: QML从ECMAScript继承而来,所以支持这个ECMAScript。经常在QML工程中看到Math、Data.....等方法,但是在Qt手册里搜索不到,这是因为这些方法不是QtQuick的,而是ECMAScript的。 ECMAScript+QtQuick=QML 阅读全文
posted @ 2018-08-06 14:58 朱小勇 阅读(390) 评论(0) 推荐(0)
摘要: 1、QML rect.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1);//random返回0~1的随机数 2、Qt QColor clr(rand() % 256, rand() % 256, rand() % 256) 阅读全文
posted @ 2018-08-06 13:58 朱小勇 阅读(2061) 评论(0) 推荐(0)
上一页 1 ··· 86 87 88 89 90 91 92 93 94 ··· 134 下一页