• <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等多種語言 程序猿
            Styles是QT自帶的例子 - 主要展示的是QT程序界面風格方面的編程知識
            1.程序調(diào)色板的獲取
            使用QApplication中的靜態(tài)函數(shù)
            QApplication::palette
            palette有2個版本一個是給定的調(diào)色板,另外一個給定的調(diào)色板
            對應的調(diào)用QApplication::setPalette就可以設置新的程序調(diào)色板
            如果使用自定義的Palette就可以達到修改界面色調(diào)的目的
            比如:
            2.
            QStyleFactory對象
            The QStyleFactory class creates QStyle objects.
            可以通過靜態(tài)函數(shù)QStyleFactory::key()獲取工廠所支持的風格名字列表(注意是列表,返回類型是QStringList)
            當然可以通過函數(shù)cerate來生成新的風格指針
            3.
            QComboBox 組合框
            主要函數(shù)有以下幾個:
            通過函數(shù)
            addItem增加新項
            通過addItems增加新項列表
            通過插槽綁定就可以傳遞響應了:
            connect(combobox,SIGNAL(activated(QString)),this, SLOT(changeComBox(QString)));
            其他三個可能會用到的函數(shù)

            currentIndex,count, currentText

            4.QT計時器
            拿例子說下:
            QTimer *timer = new QTimer(this);
                connect(timer, SIGNAL(timeout()), 
            this, SLOT(advanceProgressBar()));
                timer
            ->start(1000);
            首先構(gòu)造一個計時器 然后綁定計時器對象和槽函數(shù)
            之后啟用計時器-每隔1秒鐘調(diào)用advaceProressBar函數(shù)
            如果想停止計時器則調(diào)用stop函數(shù)即可
            5.QProgressBar進度條對象
            基本的函數(shù)就那些
            設置方向,當前值,最大值最小值,文本,可見性等等
            progressBar = new QProgressBar;
            progressBar
            ->setRange(010000);
            progressBar
            ->setValue(0);
            其槽函數(shù)為

            valueChanged ( int value )

            6.單選按鈕QRodioButton
            例子如下
                topLeftGroupBox = new QGroupBox(tr("Group 1"));
                radioButton1 
            = new QRadioButton(tr("Radio button 1"));
                radioButton2 
            = new QRadioButton(topLeftGroupBox);
                radioButton2
            ->setText(tr("Radio button 2"));
                radioButton3 
            = new QRadioButton(tr("Radio button 3"));
                radioButton1
            ->setChecked(true);
                layout
            ->addWidget(radioButton1);
                layout
            ->addWidget(radioButton2);
                layout
            ->addWidget(radioButton3);
            似乎沒什么可說的
            7.
            QTableWidget控件
            The QTableWidget class provides an item-based table view with a default model.
            需要說明的是如果要使用自定義類型,則需要使用QTableView而非QTableWidget.
            tableWidget = new QTableWidget(this);
                 tableWidget
            ->setRowCount(10);
                 tableWidget
            ->setColumnCount(5);
            不過感覺以后不會使用這個對象
            8.QLineText
            QT的單行輸入控件
            具體函數(shù)有(似乎不需要說功能了)
            QString text() const;
            QString displayText() 
            const;
            int maxLength() const;
            void setMaxLength(int);
            bool isReadOnly() const;
            void setReadOnly(bool);
            bool isModified() const;
            void setModified(bool);
            9.
            Q_INIT_RESOURCE(styles);
            加載資源文件
            styles.qrc

            posted on 2011-03-20 12:19 ccsdu2009 閱讀(1182) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            99麻豆久久久国产精品免费| 亚洲精品美女久久777777| 777午夜精品久久av蜜臀| 狠狠人妻久久久久久综合| 久久国产精品一国产精品金尊 | 东方aⅴ免费观看久久av| 久久99精品久久久久久水蜜桃| 国产精品久久久久影视不卡| 久久精品人人做人人爽电影| 久久99这里只有精品国产| 久久久综合香蕉尹人综合网| 久久久久香蕉视频| 久久国产成人午夜aⅴ影院 | 岛国搬运www久久| 久久精品国产久精国产| 精品综合久久久久久97超人| 久久免费视频网站| 国产成人香蕉久久久久| yellow中文字幕久久网| 狠狠人妻久久久久久综合| 女同久久| 久久久久久国产精品美女| 久久综合狠狠综合久久| 精品久久久久久无码中文字幕一区| 乱亲女H秽乱长久久久| 久久99精品国产| 国内精品久久久久久久涩爱| 久久久久人妻一区精品果冻| 日本WV一本一道久久香蕉| 久久精品国产99久久久| 久久精品国产99国产精品澳门 | 亚洲欧美一级久久精品| 精品久久亚洲中文无码| 国产精品一久久香蕉产线看| 91久久精品电影| 精品人妻伦九区久久AAA片69| 久久人人爽人人爽人人AV东京热| 99久久人妻无码精品系列蜜桃| 久久成人国产精品一区二区| 国产亚洲精久久久久久无码77777| 国产精品美女久久久久久2018|