• <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
            謝謝你  回復  更多評論
              
            伊人久久大香线蕉亚洲| 久久精品极品盛宴观看| 久久国产高清字幕中文| 久久精品国产免费一区| 久久久99精品成人片中文字幕| 久久久国产精品| 久久水蜜桃亚洲av无码精品麻豆| 久久国产免费观看精品| 香蕉99久久国产综合精品宅男自| 亚洲国产精品成人久久| 国产精品99久久久久久猫咪| AV无码久久久久不卡蜜桃| 亚洲天堂久久精品| 狠狠色狠狠色综合久久| 国产精品亚洲综合专区片高清久久久| 一级做a爰片久久毛片看看| 久久99国产精品久久久| 久久精品国产亚洲av麻豆图片 | 久久天天躁狠狠躁夜夜2020| 久久99热这里只有精品国产| 品成人欧美大片久久国产欧美... 品成人欧美大片久久国产欧美 | 国产精品久久免费| 久久久久久伊人高潮影院| 国内精品久久久久久久久| 无码伊人66久久大杳蕉网站谷歌 | 麻豆久久久9性大片| yellow中文字幕久久网| 999久久久无码国产精品| 久久精品国产免费观看| 亚洲精品国产自在久久| 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区| 久久久久久曰本AV免费免费| 综合久久一区二区三区 | 久久九九亚洲精品| 久久精品国产清高在天天线| 精品熟女少妇AV免费久久| 亚洲国产精品成人AV无码久久综合影院 | 国产精品99久久精品| 色综合久久久久久久久五月| 久久精品一本到99热免费| 亚洲国产另类久久久精品小说 |