• <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
            <2008年1月>
            303112345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789


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

            常用鏈接

            留言簿(94)

            隨筆分類(649)

            隨筆檔案(505)

            相冊

            BCB

            Crytek

            • crymod
            • Crytek's Offical Modding Portal

            Game Industry

            OGRE

            other

            Programmers

            Qt

            WOW Stuff

            搜索

            •  

            積分與排名

            • 積分 - 911585
            • 排名 - 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 七星重劍 閱讀(1905) 評論(1)  編輯 收藏 引用 所屬分類: PL--c/c++C++ lib -- Qt

            FeedBack:
            # re: 遷移《Qt教程一 —— 第三章:家庭價值》到Qt 4.3.0 2016-01-22 12:34 Soler
            謝謝你  回復  更多評論
              
            91久久精品电影| 久久久青草青青亚洲国产免观| 久久一区二区三区99| 日本精品久久久久影院日本 | 久久久久久精品成人免费图片| 色99久久久久高潮综合影院| 亚洲精品乱码久久久久久蜜桃不卡 | 久久精品草草草| 久久夜色撩人精品国产小说| 久久精品国产亚洲av日韩| 久久国产精品二国产精品| 久久丫忘忧草产品| 狠狠综合久久综合中文88| 久久久精品国产sm调教网站| 天天影视色香欲综合久久| 久久99精品国产99久久| 久久久久久久综合狠狠综合| 97超级碰碰碰碰久久久久| 伊人久久大香线蕉av不变影院| 国产精品成人99久久久久91gav| 久久国产免费直播| 久久WWW免费人成一看片| 久久精品国产精品亜洲毛片| 精品国产一区二区三区久久久狼| 日韩亚洲国产综合久久久| 欧美精品一区二区精品久久| 久久久久亚洲AV片无码下载蜜桃| 久久国产成人午夜AV影院| 一本伊大人香蕉久久网手机| 国产精品一久久香蕉国产线看| 久久久久久久久久久精品尤物| 老司机午夜网站国内精品久久久久久久久| 久久99精品久久久久久hb无码| 7777精品久久久大香线蕉 | 国产精品福利一区二区久久| 亚洲午夜久久久久久久久久 | 伊人久久精品影院| 久久99久国产麻精品66| 一本久久a久久精品综合香蕉| 久久亚洲天堂| 狠狠色综合网站久久久久久久高清|