• <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++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿
            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"
            : "系統日志..","time": "2016-10-2","type":newType});
                                    }
                                }
                            }

                            ListModel 
            {

                                id
            :idListModle
                                ListElement {
                                    descripe: "系統日志"
                                    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 閱讀(1651) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            久久精品夜夜夜夜夜久久| 国产精品一区二区久久精品无码| 青青草原综合久久大伊人精品| 久久精品无码一区二区无码| 国产精品久久久久天天影视 | 国产亚洲美女精品久久久2020| 亚洲一区精品伊人久久伊人| 久久精品国产日本波多野结衣| 久久久久久精品无码人妻| 国产精品视频久久| 久久人人爽人人精品视频| 婷婷五月深深久久精品| 色综合久久精品中文字幕首页| 四虎影视久久久免费| 99久久er这里只有精品18| 久久久精品人妻无码专区不卡| 影音先锋女人AV鲁色资源网久久| 久久久久久久综合日本亚洲 | 一级做a爰片久久毛片毛片| 久久大香香蕉国产| 久久久久九九精品影院| 久久天天躁狠狠躁夜夜网站| 国产精品热久久无码av| 国产成人精品久久| 欧美亚洲另类久久综合婷婷| 99久久国语露脸精品国产| 国产成人久久精品一区二区三区 | 99久久做夜夜爱天天做精品| 久久亚洲AV成人无码电影| 欧美午夜A∨大片久久 | 精品久久久久久无码专区| 日韩欧美亚洲国产精品字幕久久久| 97精品伊人久久大香线蕉app| 国产精品亚洲综合久久| 久久久久国产一区二区三区| 99久久精品费精品国产一区二区| 亚洲AV日韩精品久久久久久久 | 日本强好片久久久久久AAA| 久久久久国产一区二区 | 婷婷久久综合九色综合绿巨人| 精品一区二区久久|