• <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国产综合精品免费| 久久有码中文字幕| 综合人妻久久一区二区精品| 久久亚洲精品国产亚洲老地址| 超级97碰碰碰碰久久久久最新| 欧美日韩精品久久久免费观看 | 99久久99这里只有免费的精品| 精品久久一区二区三区| 伊人久久大香线蕉精品不卡| 久久久一本精品99久久精品88| 999久久久免费国产精品播放| 国产激情久久久久久熟女老人| 久久精品国产一区二区三区日韩| 青青草原综合久久大伊人| 国产精品99久久免费观看| 日韩精品久久久久久久电影| 精品一区二区久久久久久久网站| 伊人久久大香线蕉AV一区二区| 国产AⅤ精品一区二区三区久久 | 久久久久久A亚洲欧洲AV冫| 久久这里只有精品18| 合区精品久久久中文字幕一区| 国产成人久久激情91| 久久综合给合久久国产免费| 精品久久久一二三区| 久久福利片| 久久99久久成人免费播放| 欧美精品一区二区精品久久| 久久精品无码专区免费东京热| 亚洲午夜无码久久久久| 久久精品久久久久观看99水蜜桃| 久久久久久av无码免费看大片| 国产精品一区二区久久精品无码| AV无码久久久久不卡蜜桃| 久久99热只有频精品8| 久久精品麻豆日日躁夜夜躁| 少妇久久久久久被弄高潮| 久久夜色精品国产噜噜麻豆| 日本强好片久久久久久AAA| 无码国内精品久久人妻| 精品久久久噜噜噜久久久|