<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      qml布局記錄

      image
      main.qml 源碼

      import QtQuick
      
      Window {
          width: 640
          height: 485
          visible: true
          title: qsTr("布局學習")
      
          Rectangle  {
              id:leftrect
              width: 180; height: 480
              anchors.top:parent.top
              anchors.topMargin:5
              border.color: "white"
              border.width: 2
              scale: 1
              color: "#c0c0c0"
              Column {
                  Text {
                      anchors.horizontalCenter: parent.horizontalCenter
                      text: "Column布局"
                      font.pointSize: 20
                  }
                  anchors.horizontalCenter: parent.horizontalCenter
                  spacing: 10
                  Rectangle { color: "lightblue"; radius: 10.0
                              width: 150; height: 80
                              Text { anchors.centerIn: parent
                                     font.pointSize: 24; text: "頭像" } }
                  Rectangle { color: "gold"; radius: 10.0
                              width: 150; height: 50
                              Text { anchors.centerIn: parent
                                     font.pointSize: 24; text: "頭條" } }
                  Rectangle { color: "lightgreen"; radius: 10.0
                              width: 150; height: 50
                              Text { anchors.centerIn: parent
                                     font.pointSize: 24; text: "娛樂" } }
                  Rectangle { color: "lightyellow"; radius: 10.0
                              width: 150; height: 50
                              Text { anchors.centerIn: parent
                                     font.pointSize: 24; text: "體育" } }
                  Rectangle { color: "lightblue"; radius: 10.0
                              width: 150; height: 50
                              Text { anchors.centerIn: parent
                                     font.pointSize: 24; text: "電競" } }
      
              }
      
          }
      
          Rectangle {
                  id:rightrect
                 width: 460; height: 50
                 color: "#c0c0c0"
                  anchors.left:leftrect.right
                  anchors.top:parent.top
                  anchors.topMargin:5
                  border.color: "white"
                  border.width: 2
                 Row {
                     anchors.horizontalCenter: parent.horizontalCenter
                     anchors.verticalCenter: parent.verticalCenter
                     spacing: 5
                     Text {
                         anchors.verticalCenter: parent.verticalCenter
                         text: "Row布局"
                         font.pointSize: 18
                     }
                     Rectangle { width: 80; height: 30; radius: 20.0
                                 color: "#024c1c"
                                 Text { anchors.centerIn: parent
                                        font.pointSize: 14; text: "圖片" } }
                     Rectangle { width: 80; height: 30; radius: 20.0
                                 color: "#42a51c"
                                 Text { anchors.centerIn: parent
                                        font.pointSize: 14; text: "語音" } }
                     Rectangle { width: 80; height: 30; radius: 20.0
                                 color: "pink"
                                 Text { anchors.centerIn: parent
                                        font.pointSize: 14; text: "文章" } }
                     Rectangle { width: 80; height: 30; radius: 20.0
                                 color: "lightgreen"
                                 Text { anchors.centerIn: parent
                                        font.pointSize: 14; text: "評論" } }
                 }
          }
          Rectangle {
                  id:gridrect
                  border.color: "white"
                  border.width: 2
                 width: 230; height: 430
                 color: "#c0c0c0"
                  anchors.left:leftrect.right
                  anchors.top:rightrect.bottom
                  anchors.topMargin:0
                  Text {
                      anchors.top: parent.top
                      anchors.horizontalCenter: parent.horizontalCenter
                      text: "Grid布局"
                      font.pointSize: 18
                  }
                  Grid {
                          anchors.horizontalCenter: parent.horizontalCenter
                          anchors.verticalCenter: parent.verticalCenter
                          columns: 3
                          spacing: 6
      
                          Rectangle { color: "#aa6666"; width: 30; height: 30 }
                          Rectangle { color: "#aaaa66"; width: 70; height: 30 }
                          Rectangle { color: "#9999aa"; width: 30; height: 70 }
                          Rectangle { color: "#6666aa"; width: 10; height: 10 }
                          Rectangle { color: "#25252e"; width: 50; height: 60 }
                          Rectangle { color: "#aa6666"; width: 30; height: 30 }
                          Rectangle { color: "#aa6666"; width: 30; height: 30 }
                      }
          }
      
          Rectangle {
                  color: "#c0c0c0"
                 width: 230; height: 430
                 border.color: "white"
                 border.width: 2
                  anchors.left:gridrect.right
                  anchors.top:rightrect.bottom
                  Text {
                      anchors.top: parent.top
                      anchors.horizontalCenter: parent.horizontalCenter
                      text: "Flow布局"
                      font.pointSize: 18
                  }
                 Flow {
                     anchors.fill: parent
                     anchors.topMargin:60
                     anchors.margins: 4
                     spacing: 10
      
                     Rectangle { color: "#aa6666"; width: 40; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 50; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 20; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 10; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 40; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 50; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 30; height: 30 }
                     Rectangle { color: "#aa6666"; width: 50; height: 30 }
      
                     Rectangle { color: "#c0c0c0"; width: 222; height: 60 }
      
                     Rectangle { color: "#6666aa"; width: 30; height: 30 }
                     Rectangle { color: "#6666aa"; width: 30; height: 40 }
                     Rectangle { color: "#6666aa"; width: 30; height: 50 }
                     Rectangle { color: "#6666aa"; width: 30; height: 60 }
                     Rectangle { color: "#6666aa"; width: 30; height: 40 }
                     Rectangle { color: "#6666aa"; width: 30; height: 30 }
                     Rectangle { color: "#6666aa"; width: 30; height: 10 }
                     Rectangle { color: "#6666aa"; width: 30; height: 20 }
                     Rectangle { color: "#6666aa"; width: 30; height: 30 }
                 }
             }
      }
      
      

      Column 內容一列展示
      row 內容一行展示
      grid 內容承網格狀,可以設置列數,取內容最大寬高值排列
      flow 內容呈流式布局,取行內容最大高度排列行

      使用Layouts制作登錄頁面
      image
      main.qml

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Layouts 1.15
      
      ApplicationWindow {
          visible: true
          width: 640
          height:480
          title: "登錄界面"
          color: "white"  // 設置窗口整體背景顏色為淡灰色
          Rectangle  {
              id:leftrect
              width: parent.width*0.5; height: parent.height*0.5
              anchors.top:parent.top
              anchors.topMargin:100
              anchors.horizontalCenter:parent.horizontalCenter
              scale: 1
              ColumnLayout{
              spacing: 5  // 適當增大ColumnLayout的整體間距
              anchors.fill:parent
      
      
              Text {
                  font.family: "微軟雅黑"
                  font.pointSize: 20
                  text: "歡迎登錄"
                  color: "#333"
                  font.bold: true  // 設置字體加粗
                  Layout.alignment:Qt.AlignHCenter
              }
      
              GridLayout {
                  columns:2
                  rowSpacing: 15  // 微調GridLayout的行間距
                  columnSpacing: 15  // 微調GridLayout的列間距
                  Layout.alignment: Qt.AlignHCenter
      
                  Label{
                      font.family: "微軟雅黑"
                      text: "用戶名:"
                      color: "#333"
                  }
                  TextField {
                      placeholderText: "請輸入用戶名"
                      Layout.minimumWidth: 180
                      font.family: "微軟雅黑"
                      color: "#333"
                  }
      
                  Label{
                      font.family: "微軟雅黑"
                      text: "密碼:"
                      color: "#333"
                  }
                  TextField {
                      placeholderText: "請輸入密碼"
                      echoMode: TextInput.Password
                      Layout.minimumWidth: 180
                      font.family: "微軟雅黑"
                      color: "#333"
                  }
              }
      
              RowLayout{
                  id:btns
                  spacing: 20  // 適當增大RowLayout中按鈕的間距
                  Layout.alignment: Qt.AlignHCenter
      
                  Button {
                      text: "登錄"
                      Layout.preferredWidth: 120
                      font.family: "微軟雅黑"
                      background: Rectangle {  // 定義按鈕的背景矩形
                          color: "#4CAF50"  // 設置按鈕默認背景顏色為綠色
                          border.width: 1
                          border.color: "#388E3C"  // 設置邊框顏色
                      }
                      hoverEnabled: true  // 開啟鼠標懸停效果檢測
      
                  }
      
                  Button {
                      text: "注冊"
                      Layout.preferredWidth: 120
                      font.family: "微軟雅黑"
                      background: Rectangle {
                          color: "#2196F3"  // 設置注冊按鈕默認背景顏色為藍色
                          border.width: 1
                          border.color: "#1976D2"
                      }
                      hoverEnabled: true
      
                  }
              }
      
              Label {
                  font.family: "微軟雅黑"
                  font.pointSize: 12
                  text: "忘記密碼?"
                  color: 'blue'
                  Layout.alignment:Qt.AlignLeft
                  anchors.left:btns.left
              }
          }
      
          }
      }
      
      
      posted @ 2024-12-27 17:33  嘚惹  閱讀(38)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 狠狠综合久久av一区二| 曰本丰满熟妇xxxx性| 人妻换着玩又刺激又爽| 国产成人精品久久一区二区 | 亚洲精品理论电影在线观看| 精品亚洲精品日韩精品| 激情综合网激情综合网激情| 大陆精大陆国产国语精品| av男人的天堂在线观看国产 | 国产亚洲999精品AA片在线爽| 又大又硬又爽免费视频| 国产学生裸体无遮挡免费| 内地自拍三级在线观看| 国产乱弄免费视频观看| 粉嫩一区二区三区国产精品| 少妇真人直播免费视频| 亚洲av午夜福利大精品| 国产精品一码在线播放| 鹤庆县| 97视频精品全国免费观看| 无码激情亚洲一区| 久久久av波多野一区二区| 部精品久久久久久久久| 巨胸不知火舞露双奶头无遮挡| 激情五月开心婷婷深爱| 韩国午夜福利片在线观看| 欧美大屁股喷潮水xxxx| 色伦专区97中文字幕| 亚洲欧洲一区二区天堂久久| 国产午夜精品久久精品电影| 亚洲国产中文在线有精品| 精品国产一区二区三区av性色| 乱色精品无码一区二区国产盗| 国产亚洲人成网站在线观看| 免费VA国产高清大片在线| 绍兴县| 国产微拍一区二区三区四区| 欧美日韩精品一区二区三区不卡| 中文字幕制服国产精品| 美女黄网站人色视频免费国产| 成年女人碰碰碰视频播放|