• <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 1.1
                
            Column
            {
                spacing: 2
                Repeater
                {
                    model: ["A","B","C","D","E","F"]
                    Rectangle
                    {
                        width: 100
                        height: 20
                        radius: 3
                        color: "blue"
                        Text
                        {
                            anchors.centerIn: parent
                            text: modelData
                        }
                    }
                }
            }
            2
            import QtQuick 2.2  
            import QtQuick.Controls 1.1
                
            Column
            {
                spacing: 2
                Repeater
                {
                    model: 5
                    Rectangle
                    {
                        width: 100
                        height: 20
                        radius: 3
                        color: "blue"
                        Text
                        {
                            anchors.centerIn: parent
                            text: modelData
                        }
                    }
                }
            }

            posted @ 2015-08-20 13:53 ccsdu2009 閱讀(393) | 評論 (0)編輯 收藏
             
            import QtQuick 2.2  
            import QtQuick.Controls 1.1 
                 
            Image 
            {
                width
            : 240
                height: 240
                source: "assets/background.png"
                Image 
                {
                    id: ufo
                    y: 90
                    x: 90
                    width: 48
                    height: 48
                    source: "assets/ufo.png"
                
            }
                
                ParallelAnimation
                
            {
                    id
            : ani
                    NumberAnimation
                    {
                        target: ufo
                        properties: "width"
                        to: 60
                        duration: 600
                    
            }
                    NumberAnimation
                    
            {
                        target
            : ufo
                        properties: "height"
                        to: 60
                        duration: 600
                    
            }    
                }
                    
                MouseArea 
                
            {
                    anchors.fill
            : parent
                    onClicked: 
                    {
                        ani.restart()
            ;
                    
            }
                }         
            }
            序列動畫
            import QtQuick 2.2  
            import QtQuick.Controls 1.1 
                 
            Image 
            {
                width
            : 240
                height: 240
                source: "assets/background.png"
                Image 
                {
                    id: ufo
                    y: 90
                    x: 90
                    width: 48
                    height: 48
                    source: "assets/ufo.png"
                
            }
                
                SequentialAnimation
                
            {
                    id
            : ani
                    NumberAnimation
                    {
                        target: ufo
                        properties: "width"
                        to: 60
                        duration: 600
                    
            }
                    NumberAnimation
                    
            {
                        target
            : ufo
                        properties: "height"
                        to: 60
                        duration: 600
                    
            }    
                }
                    
                MouseArea 
                
            {
                    anchors.fill
            : parent
                    onClicked: 
                    {
                        ani.restart()
            ;
                    
            }
                }         
            }

            posted @ 2015-08-20 13:41 ccsdu2009 閱讀(630) | 評論 (0)編輯 收藏
             
            行列布局
                import QtQuick 2.2  
                import QtQuick.Controls 1.1 
                 
                Item 
                
            {
                    id
            : root
                    Column 
                    {
                        id: buttons
                        anchors.centerIn: parent
                        spacing: 6
                        MyButton
                        {
                            width:64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                        
            }
                        
                        Row 
                        
            {
                            id
            : rows
                            spacing: 12
                            MyButton
                            {
                                width:64
                                height:48
                            
            }
                            MyButton
                            
            {
                                width
            :64
                                height:48
                            
            }
                            MyButton
                            
            {
                                width
            :64
                                height:48
                            
            }
                        }
                    }
                }   

            格子布局
                import QtQuick 2.2  
                import QtQuick.Controls 1.1 
                 
                Item 
                
            {
                    id
            : root
                    Grid
                    {
                        id: buttons
                        rows: 3
                        columns: 2
                        anchors.centerIn: parent
                        spacing: 6
                        MyButton
                        {
                            width:64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                        
            }
                        MyButton
                        
            {
                            width
            :64
                            height:48
                            color: "red"
                        
            }
                    }
                }   

            MyButton.qml
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                 
                Rectangle 
                
            { 
                    id
            : item
                    color: "yellow"
                    border.color: "blue"
                    Text 
                    {
                        id: text
                        anchors.centerIn: parent
                        text: "點擊我"
                    
            }
                    MouseArea 
                    
            {
                        anchors.fill
            : parent
                        onClicked: 
                        {
                            text.text = "我被點擊了"
                        
            }
                    }
                }
            posted @ 2015-08-20 11:47 ccsdu2009 閱讀(381) | 評論 (0)編輯 收藏
             
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                
                Rectangle 
                
            {
                    id
            : rect1
                    x: 12
            ; y: 12
                    width: 176
            ; height: 96
                    gradient: Gradient 
                    {
                        GradientStop { position: 0.0
            ; color: '#FF4444' }
                        GradientStop 
            { position: 1.0; color: "blue" }
                    }
                    // 邊框顏色
                    border.color: "red"
                    radius: 8
                    
                    Text 
                    
            {
                        text
            : "The quick brown fox"
                        color: "#303030"
                        anchors.centerIn: parent
                        font.family: "Ubuntu"
                        font.pixelSize: 24
                    
            }    
                }

            再上一個
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                
                Rectangle 
                
            {
                    id
            : rect1
                    x: 12
            ; y: 12
                    width: 176
            ; height: 96
                    gradient: Gradient 
                    {
                        GradientStop { position: 0.0
            ; color: '#FF4444' }
                        GradientStop 
            { position: 1.0; color: "blue" }
                    }
                    // 邊框顏色
                    border.color: "red"
                    radius: 8
                    
                    Text 
                    
            {
                        text
            : "The quick brown fox"
                        color: "#303060"
                        anchors.centerIn: parent
                        font.family: "Ubuntu"
                        font.pixelSize: 24
                        elide: Text.ElideMiddle
                        style: Text.Sunken
                        styleColor: '#FF4444'
                        verticalAlignment: Text.AlignTop
                    
            }    
                }
            使用鼠標控制字體的顯示
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                
                Rectangle 
                
            {
                    id
            : rect1
                    x: 12
            ; y: 12
                    width: 176
            ; height: 96
                    gradient: Gradient 
                    {
                        GradientStop { position: 0.0
            ; color: '#FF4444' }
                        GradientStop 
            { position: 1.0; color: "blue" }
                    }
                    // 邊框顏色
                    border.color: "red"
                    radius: 8
                    
                    Text 
                    
            {
                        id
            : text
                        text: "The quick brown fox"
                        color: "#303060"
                        anchors.centerIn: parent
                        font.family: "Ubuntu"
                        font.pixelSize: 24
                        elide: Text.ElideMiddle
                        style: Text.Sunken
                        styleColor: '#FF4444'
                        verticalAlignment: Text.AlignTop
                        visible: true
                    
            }    
                    
                    MouseArea 
                    
            {
                        id
            : area
                        width: parent.width
                        height: parent.height
                        onClicked: text.visible = !text.visible
                    
            }        
                }

            posted @ 2015-08-20 11:13 ccsdu2009 閱讀(3167) | 評論 (0)編輯 收藏
             
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                
                Text 
                
            {
                    id
            : label
                    x: 24
                    y: 24
                    
                    //here
                    property int spacePresses: 0
                    
                    text: "Space pressed: " + spacePresses + " times"
                    onTextChanged: console.log("text changed to:", text)

                    focus: true
                    
                    Keys.onSpacePressed: 
                    {
                        increment()
                    
            }
                    Keys.onEscapePressed: 
                    
            {
                        label.text = ''
                    
            }
                    
                    //! 這是一個js函數
                    function increment() 
                    
            {
                        spacePresses = spacePresses + 1
                    
            }
                }
            posted @ 2015-08-20 10:51 ccsdu2009 閱讀(376) | 評論 (0)編輯 收藏
             
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                
                Rectangle 
                
            {        
                    Image
                    {
                        anchors.fill
            : parent
                        id: background
                        source: "background.png"
                    
            }
                    
                    width: 360
                    height: 360
                    Text 
                    
            {
                        anchors.centerIn
            : parent
                        text: "你好世界,點擊鼠標退出程序"
                    
            }
                    MouseArea 
                    
            {
                        anchors.fill
            : parent
                        onClicked: 
                        {
                            Qt.quit()
            ;
                        
            }
                    }    
                }   
            posted @ 2015-08-20 10:33 ccsdu2009 閱讀(281) | 評論 (0)編輯 收藏
             
            基本代碼如下:
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                  
                Image
                
            {
                    id
            : root
                    source: "background.png"
                
            }
            這個是使用給定圖形填充背景,
            如果使用多個圖形嵌套,做法如下:
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                  
                Image
                
            {
                    id
            : root
                    source: "background.png"
                    
                    Image
                    {
                        id: head
                        source: "head.png"
                        anchors.centerIn: parent
                        anchors.verticalCenterOffset: 20
                    
            }
                }
            當然可以再加上旋轉
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                  
                Image
                {
                    id: root
                    source: "background.png"
                    
                    Image
                    {
                        id: head
                        width: 48
                        height: 48
                        source: "head.png"
                        anchors.centerIn: parent
                        anchors.verticalCenterOffset: 20
                        
                        MouseArea
                        {
                            anchors.fill: parent
                            onClicked: head.rotation += 9
                        }
                    }
                }
            加上動畫可以讓旋轉更加平滑點,如下:
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                  
                Image
                
            {
                    id
            : root
                    source: "background.png"
                    
                    Image
                    {
                        id: head
                        width: 48
                        height: 48
                        source: "head.png"
                        anchors.centerIn: parent
                        anchors.verticalCenterOffset: 20
                        
                        MouseArea 
                        {
                            anchors.fill: parent
                            onClicked: head.rotation += 90
                        
            }
                        
                        Behavior on rotation 
                        
            {
                            NumberAnimation 
                            {
                                duration
            : 600
                            
            }
                        }
                    }
                }
            posted @ 2015-08-20 10:24 ccsdu2009 閱讀(360) | 評論 (0)編輯 收藏
             
            一個Item對應一個場景,提供隱藏或顯示場景即可切換,如下:
                import QtQuick 2.2  
                import QtQuick.Controls 1.1  
                  
                ApplicationWindow  
                
            {  
                    visible
            : true  
                    width:  480  
                    height: 360  
                    title: "Hello World"  
                  
                    Item  
                    {  
                        id: scene_1  
                        visible: true  
                        anchors.fill: parent  
                        Text  
                        {  
                            anchors.centerIn: parent  
                            textFormat: Text.RichText  
                            text: "<h1><font color=red>這是第一個場景</color></h1>" 
                        
            }  
                        MouseArea  
                        
            {  
                            anchors.fill
            : parent  
                            onClicked:  
                            {  
                                scene_1.visible = false
            ;
                                scene_2.visible = true;
                                scene_3.visible = false;                     
                            
            }  
                        }  
                  
                    }  
                  
                    Item  
                    
            {  
                        id
            : scene_2  
                        visible: false  
                        anchors.fill: parent  
                        Text  
                        {  
                            anchors.centerIn: parent  
                            textFormat: Text.RichText  
                            text: "<h1><font color=green>這是第二個場景</color></h1>" 
                        
            }  
                        MouseArea  
                        
            {  
                            anchors.fill
            : parent  
                            onClicked:  
                            {  
                                scene_2.visible = false
            ;  
                                scene_1.visible = false;
                                scene_3.visible = true;                    
                            
            }  
                        }  
                    }  
                    
                    Item  
                    
            {  
                        id
            : scene_3  
                        visible: false  
                        anchors.fill: parent  
                        Text  
                        {  
                            anchors.centerIn: parent  
                            textFormat: Text.RichText  
                            text: "<h1><font color=black>這是第三個場景</color></h1>"
                        
            }  
                        MouseArea  
                        
            {  
                            anchors.fill
            : parent  
                            onClicked:  
                            {  
                                scene_1.visible = true
                                scene_2.visible = false
            ;
                                scene_3.visible = false;                      
                            
            }  
                        }  
                    }          
                } 
            posted @ 2015-08-19 17:54 ccsdu2009 閱讀(464) | 評論 (0)編輯 收藏
             
             如下:
                        
                        sql 
            += "',N'";
                        sql 
            += desc1;
                        sql 
            += "',N'";
                        sql 
            += desc2;
                        sql 
            += "',N'";
                        sql 
            += desc3;
                        sql 
            += "');select @@identity;";
                        
                        OleDbConnection conn 
            = getOleDbConntion();
                        OleDbCommand cmd 
            = new OleDbCommand(sql, conn);
                        conn.Open();

                        OleDbDataReader reader 
            = cmd.ExecuteReader();

                        reader.Read();
                        
            string index = reader.GetValue(0).ToString();
                        conn.Close();
                        
            return index;
                    }

            posted @ 2015-07-29 16:29 ccsdu2009 閱讀(421) | 評論 (0)編輯 收藏
             
                   Date.prototype.format = function(format) {
                        
            var args = {
                            
            "M+"this.getMonth() + 1,
                            
            "d+"this.getDate(),
                            
            "h+"this.getHours(),
                            
            "m+"this.getMinutes(),
                            
            "s+"this.getSeconds(),
                            
            "q+": Math.floor((this.getMonth() + 3/ 3),  
                            
            "S"this.getMilliseconds()
                        };
                        
            if (/(y+)/.test(format))
                            format 
            = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
                        
            for (var i in args) {
                            
            var n = args[i];
                            
            if (new RegExp("(" + i + ")").test(format))
                                format 
            = format.replace(RegExp.$1, RegExp.$1.length == 1 ? n : ("00" + n).substr(("" + n).length));
                        }
                        
            return format;
                    };
            posted @ 2015-07-13 16:48 ccsdu2009 閱讀(404) | 評論 (0)編輯 收藏
            僅列出標題
            共38頁: First 6 7 8 9 10 11 12 13 14 Last 
             
            99久久99久久精品免费看蜜桃| 少妇久久久久久被弄到高潮| 久久91这里精品国产2020| 久久妇女高潮几次MBA| 一级a性色生活片久久无| A级毛片无码久久精品免费| 久久99精品国产99久久| 波多野结衣中文字幕久久| 久久久久久久久无码精品亚洲日韩 | 久久国产精品77777| 久久人人爽人人爽人人片AV不| 中文成人久久久久影院免费观看| 日韩影院久久| 超级碰碰碰碰97久久久久| 欧美日韩精品久久久免费观看| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 亚洲国产另类久久久精品小说 | 国产精品99久久久久久猫咪 | 久久精品日日躁夜夜躁欧美| 久久国产劲爆AV内射—百度| 欧美噜噜久久久XXX| 91精品国产91久久久久福利| 中文字幕亚洲综合久久2| 久久精品亚洲精品国产欧美| 久久频这里精品99香蕉久| 精品久久久无码人妻中文字幕| 99精品久久精品一区二区| 精品久久久久久无码中文字幕一区| 97久久精品无码一区二区| 97超级碰碰碰碰久久久久| 久久综合狠狠综合久久97色| 久久综合九色综合网站| 国内精品伊人久久久久av一坑| 曰曰摸天天摸人人看久久久| 伊人久久成人成综合网222| 少妇精品久久久一区二区三区| 2021精品国产综合久久| 伊人久久亚洲综合影院| 国产精品久久久久影院嫩草| 欧美激情精品久久久久久久九九九| 天天爽天天狠久久久综合麻豆|