• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            Cpper
            C/C++高級(jí)工程師 Android高級(jí)軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語(yǔ)言 程序猿
            import QtQuick 2.2
            import QtQuick.Controls 2.4
            import QtQuick.Controls.Styles 1.4
            import QtQuick.Window 2.11
            import QtQuick.Layouts 1.1


            Rectangle
            {
                anchors.rightMargin
            : 4
                anchors.bottomMargin: 4
                anchors.leftMargin: 4
                anchors.topMargin: 4
                anchors.fill: parent

                ColumnLayout
                {
                    spacing: 2
                    anchors.fill: parent

                    Rectangle
                    {
                        Layout.fillWidth: true
                        Layout.fillHeight: true
                        RowLayout {
                            anchors.fill: parent
                            Rectangle
                            {
                                Layout.fillWidth: true
                                Layout.fillHeight: true

                                ListView {
                                    id:idLogListView
                                    focus:true

                                    anchors.fill: parent
                                    highlight: Rectangle { color: "#A0CED1" 
            }
                                    model: idListModle
                                    delegate: Component
                                    
            {

                                    RowLayout {

                                        id
            :idlistElemnet
                                        height: 20
                                        width: parent.width
                                        spacing: 20
                                        Layout.fillWidth: true

                                        Rectangle {height: 16
                                            width: 16
                                            radius: 5
                                            color:getListEleHeadColor(type)
                                            Text{ anchors.centerIn: parent
            }
                                        }

                                        Text 
            { text: time; font.bold: true}
                                        Text 
            { text:type }
                                        Text 
            { text:descripe; color:"blue" ; Layout.fillWidth: true}

                                        states: State 
            {
                                            name
            : "Current"
                                            when: idlistElemnet.ListView.isCurrentItem
                                            PropertyChanges { target: idlistElemnet
            ; x: 20 }
                                        }
                                        transitions: Transition 
            {
                                            NumberAnimation { properties
            : "x"; duration: 200 }
                                        }
                                        MouseArea 
            {
                                            anchors.fill
            : parent
                                            onClicked: idlistElemnet.ListView.view.currentIndex = index
                                        
            }
                                    }
                                }

                                Component.onCompleted:
                                
            {
                                    for(var idx=0;idx<100;idx++)
                                    {
                                        var newType=parseInt((Math.random(Math.random())*100+1)%3);
                                        idListModle.append( { "descripe"
            : "系統(tǒng)日志..","time": "2016-10-2","type":newType});
                                    }
                                }
                            }

                            ListModel 
            {

                                id
            :idListModle
                                ListElement {
                                    descripe: "系統(tǒng)日志"
                                    time: "2016-11-2"
                                    type:1
                                
            }
                            }
                        }

                        Rectangle
                        
            {
                            Layout.fillHeight
            : true
                            id: scrollbar
                            width: 10
            ;
                            height
            : 380
                            color: "#D9D9D9"
                            radius: 10
                            Rectangle {
                                id: button
                                x: 0
                                y: idLogListView.visibleArea.yPosition * scrollbar.height
                                width: 10
                                height: idLogListView.visibleArea.heightRatio * scrollbar.height
            ;
                                color
            : "#979797"
                                radius: 10
                                MouseArea {
                                    id: mouseArea
                                    anchors.fill: button
                                    drag.target: button
                                    drag.axis: Drag.YAxis
                                    drag.minimumY: 0
                                    drag.maximumY: scrollbar.height - button.height
                                    onMouseYChanged: {
                                        idLogListView.contentY = button.y / scrollbar.height * idLogListView.contentHeight
                                    
            }
                                }
                            }
                        }
                    }
                }

                Rectangle
                
            {
                    Layout.preferredHeight
            : 40
                    Layout.fillWidth: true
                    Layout.minimumHeight:40
                
            }
            }

                function getListEleHeadColor(ntype)
                
            {
                    switch(ntype)
                    {
                    case 0
            :
                        return "lightblue"
                    case 1:
                        return "red"
            ;
                    case 2
            :
                        return "yellow"
            ;
                    case 3
            :
                        return "green"
            ;
                    default
            :
                        return "black"
            ;
                    
            }
                }

            }
            posted on 2019-09-10 15:19 ccsdu2009 閱讀(1637) 評(píng)論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            亚洲国产精品久久久久婷婷老年 | 97精品国产91久久久久久| 久久综合亚洲色HEZYO社区| 亚洲国产精品一区二区三区久久 | 狠狠久久亚洲欧美专区| 国产精品伊人久久伊人电影| 亚洲精品乱码久久久久久不卡| 久久久久人妻精品一区二区三区| 国产精品一久久香蕉国产线看| 久久强奷乱码老熟女网站| 亚洲va久久久噜噜噜久久狠狠| 国产福利电影一区二区三区久久老子无码午夜伦不 | 国产伊人久久| 久久精品国产亚洲77777| 久久国产精品视频| av午夜福利一片免费看久久| 欧美与黑人午夜性猛交久久久 | 亚洲国产成人精品91久久久 | 欧美久久综合九色综合| 99久久777色| 久久ZYZ资源站无码中文动漫 | 久久精品九九亚洲精品| 麻豆精品久久久久久久99蜜桃| 日韩一区二区久久久久久 | 国内精品久久久久国产盗摄| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 久久福利青草精品资源站免费 | 日韩精品久久无码中文字幕| 久久亚洲国产成人精品无码区| 久久99国产精品久久| 久久亚洲精品成人AV| 久久精品国产99国产精品导航| 久久久久无码中| 久久精品无码一区二区三区日韩| 91精品国产综合久久婷婷| 伊人久久大香线蕉综合影院首页| 亚洲欧美日韩久久精品| 久久乐国产综合亚洲精品| 一级做a爰片久久毛片毛片| 久久久久久午夜精品| 免费精品久久天干天干|