0
点赞
收藏
分享

微信扫一扫

高数4.2 积分方法-换元积分法

谷中百合517 2024-08-18 阅读 21
qt学习

QML学习

  • SwipeView例程
  • 视频讲解
  • 代码

main.qml

import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    SwipeView {
        id: view
        anchors.fill: parent
        currentIndex: pageIndicator.currentIndex

        // 添加页面
        Rectangle {
            color: "red"
            Text {
                anchors.centerIn: parent
                font.pointSize: 30
                color: "white"
                text: "点赞"
            }
        }
        Rectangle {
            color: "green"
            Text {
                anchors.centerIn: parent
                font.pointSize: 30
                color: "white"
                text: "关注"
            }
        }
        Rectangle {
            color: "blue"
            Text {
                anchors.centerIn: parent
                font.pointSize: 30
                color: "white"
                text: "放假当宅宅"
            }
        }
    }

    PageIndicator {
        id: pageIndicator
        count: view.count
        currentIndex: view.currentIndex
        anchors.bottom: view.bottom
        anchors.horizontalCenter: parent.horizontalCenter
        interactive: true
        delegate: Rectangle {
            width: 40
            height: 40
            color: pressed? "pink": index===pageIndicator.currentIndex? "white": "black"
        }
    }
}

演示

视频讲解

举报

相关推荐

0 条评论