QT 6 实验

本文介绍了在2021年1月时Qt 6的QML功能尚不完整,如Style和Dialog等功能还在开发中,因此实验仍需在Qt 5.12版本上进行。示例代码展示了导入不同模块创建窗口的应用。
摘要由CSDN通过智能技术生成

截止2021 年 1月 ,Qt 6 的 qml功能还不完善,类似 Style ,Dialog等内容还在开发当中,无法使用,
以下只能在5.12上进行实验

import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick.Dialogs 1.2
import QtQml 2.12

Window
{
width: 1000
height: 1000
visible: true

Rectangle{
    anchors.fill:parent
    color: "#121212"

    BusyIndicator{
        id: busys
        running: true
        anchors.centerIn: parent
        z:3
    }

    Text {
        id: imagePath
        visible: true
        anchors.left: openfile.right
        anchors.leftMargin: 5
        anchors.verticalCenter: openfile.verticalCenter
        font.pixelSize: 14
        color: "white"
        z:3
        text: qsTr("text")
    }


    Button
    {
        id:openfile
        text:"open"

        anchors.left:parent.left
        anchors.leftMar
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值