• <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"
            : "系統(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 閱讀(1662) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            欧美日韩中文字幕久久久不卡 | 国内精品久久久久影院一蜜桃| 伊人色综合久久天天人守人婷| 亚洲欧美伊人久久综合一区二区| 久久久精品2019免费观看| 国产成人精品综合久久久| 久久久久波多野结衣高潮| 99久久777色| 亚洲中文久久精品无码| 99精品伊人久久久大香线蕉| 久久福利资源国产精品999| 国产精品久久毛片完整版| 久久午夜无码鲁丝片秋霞| 欧美激情精品久久久久| 亚洲av成人无码久久精品| 久久综合九色欧美综合狠狠| 久久久久国产精品| 久久精品中文字幕无码绿巨人| 久久综合亚洲色HEZYO国产| 久久精品国产亚洲综合色| 久久精品免费一区二区| 日本久久中文字幕| 成人午夜精品久久久久久久小说| 丰满少妇人妻久久久久久| 精产国品久久一二三产区区别| 性做久久久久久久久久久| 国产成人99久久亚洲综合精品| 精品熟女少妇a∨免费久久| 大香伊人久久精品一区二区| 日本欧美国产精品第一页久久| 欧美久久久久久精选9999| 久久久久婷婷| 久久福利资源国产精品999| 伊人久久五月天| 久久精品成人欧美大片| 99久久精品免费看国产一区二区三区| 免费一级欧美大片久久网| 国产精品久久新婚兰兰| 国内精品人妻无码久久久影院导航| 久久精品国产AV一区二区三区| 亚洲国产精品无码久久久秋霞2 |