• <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>
            隨筆 - 505  文章 - 1034  trackbacks - 0
            <2007年11月>
            28293031123
            45678910
            11121314151617
            18192021222324
            2526272829301
            2345678


            子曾經曰過:編程無他,唯手熟爾!

            常用鏈接

            留言簿(94)

            隨筆分類(649)

            隨筆檔案(505)

            相冊

            BCB

            Crytek

            • crymod
            • Crytek's Offical Modding Portal

            Game Industry

            OGRE

            other

            Programmers

            Qt

            WOW Stuff

            搜索

            •  

            積分與排名

            • 積分 - 914442
            • 排名 - 14

            最新隨筆

            最新評論

            閱讀排行榜

            評論排行榜


            Qt 3.0的是這樣子的 http://www.qiliang.net/qt/tutorial1-03.html

            /****************************************************************
            **
            ** Qt教程一 - 3
            **
            ***************************************************************
            */

            #include 
            <qapplication.h>
            #include 
            <qpushbutton.h>
            #include 
            <qfont.h>
            #include 
            <qvbox.h>

            int main( int argc, char **argv )
            {
                QApplication a( argc, argv );

                QVBox box;
                box.resize( 
            200120 );

                QPushButton quit( 
            "Quit"&box );
                quit.setFont( QFont( 
            "Times"18, QFont::Bold ) );

                QObject::connect( 
            &quit, SIGNAL(clicked()), &a, SLOT(quit()) );

                a.setMainWidget( 
            &box );
                box.show();

                
            return a.exec();
            }

            在4.3中已經沒有QVBox這個類了



            QVBox

            The QVBox class is now only available as Q3VBox in Qt 4. You can achieve the same result as QVBox by creating a QWidget with a vertical layout:

            For example, if you have code like

             QVBox *vbox = new QVBox;
             QPushButton *child1 = new QPushButton(vbox);
             QPushButton *child2 = new QPushButton(vbox); 

            you can rewrite it as

             QWidget *vbox = new QWidget;
             QPushButton *child1 = new QPushButton;
             QPushButton *child2 = new QPushButton;
            
            
             QVBoxLayout *layout = new QVBoxLayout;
             layout->addWidget(child1);
             layout->addWidget(child2);
             vbox->setLayout(layout); 

            Note that child widgets are not automatically placed into the widget's layout; you will need to manually add each widget to the QVBoxLayout.



            我寫的:

            /****************************************************************
            **
            ** Qt教程一 - 3
            **
            ***************************************************************
            */

            #include 
            <qapplication.h>
            #include 
            <qpushbutton.h>
            #include 
            <qfont.h>
            #include 
            <qboxlayout.h>

            int main( int argc, char **argv )
            {
                QApplication a( argc, argv );

                QWidget window;
                window.resize(
            200,120);

                QVBoxLayout layout;
                QPushButton quit( 
            "Quit"&window );
                quit.setFont( QFont( 
            "Times"18, QFont::Bold ) );
                QObject::connect( 
            &quit, SIGNAL(clicked()), &a, SLOT(quit()) );

                layout.addWidget(
            &quit);
                
                window.setLayout(
            &layout);
                window.show();

                
            return a.exec();
            }
            posted on 2007-07-21 05:02 七星重劍 閱讀(1921) 評論(1)  編輯 收藏 引用 所屬分類: PL--c/c++C++ lib -- Qt

            FeedBack:
            # re: 遷移《Qt教程一 —— 第三章:家庭價值》到Qt 4.3.0 2016-01-22 12:34 Soler
            謝謝你  回復  更多評論
              
            久久99精品国产麻豆| 国产精品久久久99| 中文字幕亚洲综合久久菠萝蜜| 国产亚洲综合久久系列| 久久婷婷五月综合色高清| 2021国产成人精品久久| 一级女性全黄久久生活片免费| 无码超乳爆乳中文字幕久久| 色综合久久精品中文字幕首页| 精品无码久久久久久久久久 | 99久久精品免费看国产| 亚洲欧美国产日韩综合久久| 国产一级持黄大片99久久| 香蕉久久久久久狠狠色| 久久精品亚洲中文字幕无码麻豆| 久久国产精品二国产精品| 久久久久人妻一区二区三区vr| 国产—久久香蕉国产线看观看| 久久天堂AV综合合色蜜桃网| 欧美日韩精品久久久久| 国产精品伊人久久伊人电影| 国产成人久久AV免费| 一本一道久久综合狠狠老| 久久无码国产| 久久九九久精品国产免费直播| 久久国产精品久久精品国产| 久久久久久亚洲精品成人| 国产成人精品综合久久久久 | 天堂久久天堂AV色综合| 伊人情人综合成人久久网小说| 国产亚州精品女人久久久久久| 99久久精品久久久久久清纯| 久久线看观看精品香蕉国产| 久久精品人人做人人爽电影蜜月 | 欧美伊人久久大香线蕉综合69| A级毛片无码久久精品免费| 婷婷综合久久狠狠色99h| 国产精品久久久久久久久免费| 久久久无码精品亚洲日韩按摩 | 97久久超碰成人精品网站| 久久久久99精品成人片欧美|