
Qt
月上纱窗
这个作者很懒,什么都没留下…
展开
-
QML之ListView基本使用
以下实现在qml中显示listview,数据由c++提供,切qml可以修改list某项的值。关键需要实现3个函数:int rowCount(const QModelIndex &parent) const;QVariant data(const QModelIndex &index, int role) const;QHash<int, QByteArr...原创 2019-04-22 21:46:40 · 8880 阅读 · 2 评论 -
Qt基础知识
Qt各模块作用:Qt5的模块简介Qt5.15依赖 :Qt for X11 Requirements | Qt 5.15编译静态库警告:Note: Using static linking will disable the use of dynamicallyloaded plugins. Make sure to import all needed static plugins,or compile needed modules into the library....原创 2021-11-29 14:48:07 · 283 阅读 · 0 评论 -
QML Image的source写法
QML source路径的写法原创 2022-02-23 22:30:36 · 1275 阅读 · 0 评论 -
QML Gradient 颜色渐变用法
测试版本:Qt5.15.2 Rectangle{ width: 500 height: 200 gradient: Gradient { orientation:Gradient.Horizontal //该属性设置渐变的方向 GradientStop { position: 0.0; color: "lightsteelblue" } GradientStop { p原创 2022-02-23 22:33:47 · 1086 阅读 · 0 评论 -
QML 倒影实现
import QtQuick 2.15import QtQuick.Shapes 1.15Item { width: 1280 height: 720 Rectangle{ id: object1// rotation: 30 x:300 y: 0 width: 500 height: 400 color: "lightsteelblue" .原创 2023-01-12 17:11:53 · 165 阅读 · 0 评论 -
QML 图片镜像显示
利用Scale实现对图片的镜像,即对称效果。原创 2022-02-24 10:05:02 · 934 阅读 · 0 评论 -
Qt6.2.1编译
Qt6在ubuntu的编译,Qt5也支持。原创 2022-03-05 23:09:33 · 1206 阅读 · 1 评论 -
QML 动态创建元素
有一个qml控件,我需要在运行时动态去创建,可用一下方法:控件River.qml, 里面就简单放个Image元素测试:import QtQuick 2.15Item { property string imgsrc: "" Image { id: img1 source: imgsrc }}main.qmlimport QtQuick 2.15import QtQuick.Window 2.15import QtQuic原创 2022-03-25 10:25:32 · 689 阅读 · 0 评论