• <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年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345


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

            常用鏈接

            留言簿(94)

            隨筆分類(649)

            隨筆檔案(505)

            相冊

            BCB

            Crytek

            • crymod
            • Crytek's Offical Modding Portal

            Game Industry

            OGRE

            other

            Programmers

            Qt

            WOW Stuff

            搜索

            •  

            積分與排名

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

            FeedBack:
            # re: 遷移《Qt教程一 —— 第三章:家庭價值》到Qt 4.3.0 2016-01-22 12:34 Soler
            謝謝你  回復  更多評論
              
            国产亚洲综合久久系列| 99久久国产亚洲高清观看2024| 久久精品国产72国产精福利| 久久精品国产色蜜蜜麻豆| 少妇无套内谢久久久久| 狠狠色噜噜狠狠狠狠狠色综合久久| 久久精品无码一区二区三区免费| 午夜视频久久久久一区 | 久久精品视频91| 伊人色综合久久天天人手人婷| 精品综合久久久久久97超人 | 久久久久国产一级毛片高清版| 久久久久人妻精品一区三寸蜜桃| 久久人人爽爽爽人久久久| 亚洲欧美精品一区久久中文字幕| av无码久久久久久不卡网站| 色综合久久夜色精品国产| 久久精品二区| 久久国产成人精品国产成人亚洲| 久久久久人妻一区精品性色av| 欧美麻豆久久久久久中文| 国产精品美女久久久网AV| 久久99精品国产麻豆| 久久夜色精品国产欧美乱| 青青草原综合久久大伊人| 天天综合久久一二三区| 国产真实乱对白精彩久久| 一本久久久久久久| 91精品日韩人妻无码久久不卡| 国产成人综合久久综合| 99久久99久久| 欧美亚洲国产精品久久蜜芽| 久久99中文字幕久久| 久久国产成人精品麻豆| 草草久久久无码国产专区| 精品久久久久久99人妻| 久久精品成人一区二区三区| 亚洲欧洲久久久精品| 伊人久久精品无码av一区| 久久国产色av免费看| 人妻少妇久久中文字幕一区二区|