新鲜事
-
qml中使用Qt.fontFamilies()可以返回字体的列表, 我们用一个ListView显示出来 ``` ListView{ id: comb anchors.fill: parent mode ..
-
使用Qml的Canvas来画圆形 ``` onPaint: { var ctx = getContext("2d") ctx.clearRect(0,0,width,height) ctx.beginPa ..
-
使用状态来控制开关显示的样式 ``` Rectangle { id: rect width: parent.width * 0.6 radius: parent.radius color: rect.state ..
-
``` TextEdit { id: textEdit text: "" font.pointSize: 14 height: contentHeight width: frame.width - vbar.widt ..
-
在TextEdit中增加DropArea ``` TextEdit{ id: textEdit height: 300 width: parent.width DropArea{ anchors.fill: parent on ..
-
使用QtQuick的MVC模式 新建c++类继承于QAbstractTableModel, 并实现几个重要方法: CPP中: ``` class QmlTableViewModel : public QAb ..
-
footer加上TabBar即可实现底部导航 ``` footer: TabBar { id: bar height: 48 width: parent.width currentIndex: 0 ListModel ..
-
``` Rectangle { anchors.fill: parent color: "#AAAAAA"; opacity: bMenuShown ? 1 : 0 Behavior on opacity { Num ..
-
``` TextMetrics { id: textMetrics elide: Text.ElideRight elideWidth: textField.width - 12 text: qsTr("123这是一段文 ..
-
使用QtGraphicalEffects中的OpacityMask效果: ``` Item { width: 96 height: 96 anchors.centerIn: parent Image { id: sourcei ..
-
主要是对菜单项的一个自定义: ``` MenuItem { id: menuItem1 anchors.left: parent.left anchors.leftMargin: 6 text: qsTr(&q ..
-
大家都知道通过Q_INVOKABLE可以让qml直接访问c++类的接口函数. ``` void outputMessage(QtMsgType type, const QMessageLogContext & ..
-
关于 QQuickImageProvider 官方的描述 The QQuickImageProvider class provides an interface for supporting pixmaps and threaded i ..
-
``` Text { anchors.centerIn: parent text: '<html></style><a href="http://www.baidu.com"> ..