码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Qt 6 资料汇总


    Qt 6 资料汇总

    • 1 介绍
    • 2 论坛 & wiki
      • 2.1 论坛
      • 2.2 wiki
        • 2.2.1 cmake
        • 2.2.2 Qt Design Studio
        • 2.2.3 workflow(automotive)
    • 3 书籍
      • 3.1 QML
      • 3.2 Cross-Platform Development with Qt 6 and Modern C++
    • 4 博客
    • 5 版权
    • 参考

    1 介绍

    2 论坛 & wiki

    2.1 论坛

    2.2 wiki

    https://doc.qt.io/
    Qt 6.2

    2.2.1 cmake

    Professional CMake: A Practical Guide - 12th Edition
    Qt6 支持 cmake,并不是兼容 cmake,一些cmake工程,Qt6直接打开会有头文件不显示等,具体待验证是不是哪里配置不对。
    在这里插入图片描述
    在这里插入图片描述
    Qt Creator 6 - CMake update
    Build with CMake 6.3.1
    在这里插入图片描述在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    demo qml project
    在这里插入图片描述
    Broad IDE Support
    在这里插入图片描述

    2.2.2 Qt Design Studio

    Qt Design Studio - UI Design Tools for Applications
    Qt Design Studio Manual 3.5.0

    2.2.3 workflow(automotive)

    Qt Automotive workflow developers designers
    在这里插入图片描述
    ps、figma、sketch、blender、3d max

    3 书籍

    3.1 QML

    《Qt6 QML Book》
    在这里插入图片描述

    // Button.qml
    import QtQuick
    
    Rectangle {
        id: root
        // export button properties
        property alias text: label.text
        signal clicked
        width: 116; height: 26
        color: "lightsteelblue"
        border.color: "slategrey"
        Text {
            id: label
            anchors.centerIn: parent
            text: "Start"
        }
        MouseArea {
            anchors.fill: parent
            onClicked: {
                root.clicked()
            }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    Button { // our Button component
        id: button
        x: 12; y: 12
        text: "Start"
        onClicked: {
            status.text = "Button clicked!"
        }
    }
    
    Text { // text changes when button was clicked
        id: status
        x: 12; y: 76
        width: 116; height: 26
        text: "waiting ..."
        horizontalAlignment: Text.AlignHCenter
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16

    Easing Curves
    在这里插入图片描述

    // EasingCurves.qml
    
    import QtQuick
    import QtQuick.Layouts
    
    Rectangle {
        id: root
        width: childrenRect.width
        height: childrenRect.height
    
        color: '#4a4a4a'
        gradient: Gradient {
            GradientStop { position: 0.0; color: root.color }
            GradientStop { position: 1.0; color: Qt.lighter(root.color, 1.2) }
        }
    
        ColumnLayout {
            Grid {
                spacing: 8
                columns: 5
                EasingType {
                    easingType: Easing.Linear
                    title: 'Linear'
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InExpo
                    title: "InExpo"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.OutExpo
                    title: "OutExpo"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InOutExpo
                    title: "InOutExpo"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InOutCubic
                    title: "InOutCubic"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.SineCurve
                    title: "SineCurve"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InOutCirc
                    title: "InOutCirc"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InOutElastic
                    title: "InOutElastic"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InOutBack
                    title: "InOutBack"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
                EasingType {
                    easingType: Easing.InOutBounce
                    title: "InOutBounce"
                    onClicked: {
                        animation.easing.type = easingType
                        box.toggle = !box.toggle
                    }
                }
            }
            Item {
                height: 80
                Layout.fillWidth: true
                Box {
                    id: box
                    property bool toggle
                    x: toggle ? 20 : root.width - width - 20
                    anchors.verticalCenter: parent.verticalCenter
                    gradient: Gradient {
                        GradientStop { position: 0.0; color: "#2ed5fa" }
                        GradientStop { position: 1.0; color: "#2467ec" }
                    }
                    Behavior on x {
                        NumberAnimation {
                            id: animation
                            duration: 500
                        }
                    }
                }
            }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123

    States and Transitions

    Rectangle {
        id: light1
        x: 25; y: 15
        width: 100; height: width
        radius: width / 2
        color: root.black
        border.color: Qt.lighter(color, 1.1)
    }
    
    Rectangle {
        id: light2
        x: 25; y: 135
        width: 100; height: width
        radius: width/2
        color: root.black
        border.color: Qt.lighter(color, 1.1)
    }
    
    state: "stop"
    
    states: [
        State {
            name: "stop"
            PropertyChanges { target: light1; color: root.red }
            PropertyChanges { target: light2; color: root.black }
        },
        State {
            name: "go"
            PropertyChanges { target: light1; color: root.black }
            PropertyChanges { target: light2; color: root.green }
        }
    ]
    
    MouseArea {
        anchors.fill: parent
        onClicked: parent.state = (parent.state == "stop" ? "go" : "stop")
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37

    在这里插入图片描述
    在这里插入图片描述
    As we are targeting desktop, we enforce the use of the Fusion style.

    QQuickStyle::setStyle("Fusion");
    
    • 1

    在这里插入图片描述

    import QtQuick
    import QtQuick.Controls
    import Qt.labs.platform as Platform
    
    ApplicationWindow {
        function openFileDialog() { fileOpenDialog.open(); }
        function openAboutDialog() { aboutDialog.open(); }
    
        visible: true
        title: qsTr("Image Viewer")
    
        background: Rectangle {
            color: "darkGray"
        }
    
        Image {
            id: image
            anchors.fill: parent
            fillMode: Image.PreserveAspectFit
            asynchronous: true
        }
    
        Platform.FileDialog {
            id: fileOpenDialog
    
            // ...
    
        }
    
        FileDialog {
            id: fileOpenDialog
            title: "Select an image file"
            folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
            nameFilters: [
                "Image files (*.png *.jpeg *.jpg)",
            ]
            onAccepted: {
                image.source = fileOpenDialog.fileUrl
            }
        }
    
        menuBar: MenuBar {
            Menu {
                title: qsTr("&File")
                MenuItem {
                    text: qsTr("&Open...")
                    icon.name: "document-open"
                    onTriggered: fileOpenDialog.open()
                }
            }
    
            Menu {
                title: qsTr("&Help")
                MenuItem {
                    text: qsTr("&About...")
                    onTriggered: aboutDialog.open()
                }
            }
        }
    
        Dialog {
            id: aboutDialog
            title: qsTr("About")
            Label {
                anchors.fill: parent
                text: qsTr("QML Image Viewer\nA part of the QmlBook\nhttp://qmlbook.org")
                horizontalAlignment: Text.AlignHCenter
            }
    
            standardButtons: StandardButton.Ok
        }
    
        header: ToolBar {
            Flow {
                anchors.fill: parent
                ToolButton {
                    text: qsTr("Open")
                    icon.name: "document-open"
                    onClicked: fileOpenDialog.open()
                }
            }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83

    MVC(MVD)
    在这里插入图片描述

    import QtQuick
    import "../common"
    
    Column {
        spacing: 2
    
        Repeater {
            model: ["Enterprise", "Columbia", "Challenger", "Discovery", "Endeavour", "Atlantis"]
    
            delegate: BlueBox {
                required property var modelData
                required property int index
    
                width: 100
                height: 32
                radius: 3
    
                text: modelData + ' (' + index + ')'
            }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21

    在这里插入图片描述

    import QtQuick
    import "../common"
    
    Column {
        spacing: 2
    
        Repeater {
            model: ListModel {
                ListElement { name: "Mercury"; surfaceColor: "gray" }
                ListElement { name: "Venus"; surfaceColor: "yellow" }
                ListElement { name: "Earth"; surfaceColor: "blue" }
                ListElement { name: "Mars"; surfaceColor: "orange" }
                ListElement { name: "Jupiter"; surfaceColor: "orange" }
                ListElement { name: "Saturn"; surfaceColor: "yellow" }
                ListElement { name: "Uranus"; surfaceColor: "lightBlue" }
                ListElement { name: "Neptune"; surfaceColor: "lightBlue" }
            }
    
            delegate: BlueBox {
                id: blueBox
    
                required property string name
                required property color surfaceColor
    
                width: 120
                height: 32
    
                radius: 3
                text: name
    
                Box {
                    anchors.left: parent.left
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.leftMargin: 4
    
                    width: 16
                    height: 16
    
                    radius: 8
    
                    color: blueBox.surfaceColor
                }
            }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45

    在这里插入图片描述
    Building Paths

    Shape {
        ShapePath {
            strokeWidth: 3
            strokeColor: "darkgray"
    
            startX: 420; startY: 300
    
            PathCurve { x: 460; y: 220 }
            PathCurve { x: 500; y: 370 }
            PathCurve { x: 540; y: 270 }
            PathCurve { x: 580; y: 300 }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    在这里插入图片描述

    3.2 Cross-Platform Development with Qt 6 and Modern C++

    packtpub.com
    ebin.pub
    在这里插入图片描述

    4 博客

    Qt项目升级到Qt6经验总结_feiyangqingyun的博客-CSDN博客_qt5升级qt6
    乘风破浪,遇见最美Windows 11之现代Windows桌面应用开发 - QT(v6.0)八年磨一剑,拥抱C++ 17和下一代QML - TaylorShi - 博客园
    【Qt】Qt6系列教程汇总_沧海一笑-dj的博客-CSDN博客_qt6 教程
    Qt 6介绍_amos.yang的博客-CSDN博客_qt6
    Qt 6.2 长周期版正式发布_Qt中国的博客-CSDN博客_qt 版本
    Qt 6.0正式发布了_Qt中国的博客-CSDN博客_qt6新特性

    5 版权

    https://embeddeduse.com/2022/05/17/critique-guide-to-the-total-cost-of-ownership-of-open-source-software/

    参考

    1、qt 官网
    2、Qt 6.2
    3、Professional CMake: A Practical Guide - 12th Edition
    4、Qt Creator 6 - CMake update
    5、Build with CMake 6.3.1
    6、packtpub.com
    7、ebin.pub
    8、Qt项目升级到Qt6经验总结_feiyangqingyun的博客-CSDN博客_qt5升级qt6
    9、乘风破浪,遇见最美Windows 11之现代Windows桌面应用开发 - QT(v6.0)八年磨一剑,拥抱C++ 17和下一代QML - TaylorShi - 博客园
    10、【Qt】Qt6系列教程汇总_沧海一笑-dj的博客-CSDN博客_qt6 教程
    11、Qt 6介绍_amos.yang的博客-CSDN博客_qt6
    12、Qt 6.2 长周期版正式发布_Qt中国的博客-CSDN博客_qt 版本
    13、Qt 6.0正式发布了_Qt中国的博客-CSDN博客_qt6新特性

  • 相关阅读:
    minikube搭建k8s
    区间选点问题-贪心-C++
    PS图片背景透明(抠图)
    自定义模块和第三方模块,cnmp
    基于Java实现一个简单的YACC
    电脑重装系统后内存占用高怎么解决?
    一步一步分析ChatGPT,1 粘性,2 传染性, 3 双边网络效应
    php mysql运动器材租赁预约管理系统
    超标量处理器设计 姚永斌 第5章 指令集体系 摘录
    虹科方案 | 虹科ATTO加速虚拟存储管理
  • 原文地址:https://blog.csdn.net/qq_38880380/article/details/126671924
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号