• <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年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567


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

            常用鏈接

            留言簿(94)

            隨筆分類(649)

            隨筆檔案(505)

            相冊

            BCB

            Crytek

            • crymod
            • Crytek's Offical Modding Portal

            Game Industry

            OGRE

            other

            Programmers

            Qt

            WOW Stuff

            搜索

            •  

            積分與排名

            • 積分 - 911304
            • 排名 - 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资源网站无码软件 | 精品国产热久久久福利| 久久久久一级精品亚洲国产成人综合AV区| 精品久久久一二三区| 久久久久国产一级毛片高清版| 无码任你躁久久久久久老妇| 亚洲AV日韩精品久久久久久| 久久e热在这里只有国产中文精品99| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 97久久综合精品久久久综合| www亚洲欲色成人久久精品| 久久这里只有精品首页| 国产女人aaa级久久久级| 久久天天躁狠狠躁夜夜躁2O2O| 亚洲AⅤ优女AV综合久久久| 久久精品国产亚洲沈樵| 色诱久久久久综合网ywww| 97香蕉久久夜色精品国产| 久久免费国产精品| 久久精品亚洲欧美日韩久久| 国产亚洲色婷婷久久99精品| 无码伊人66久久大杳蕉网站谷歌| 日韩精品久久久久久久电影| 久久夜色撩人精品国产小说| 国产综合免费精品久久久| 久久亚洲精品中文字幕三区| 国内精品久久久久伊人av| 国产成人久久精品一区二区三区| 精品久久久久久久无码| 国内精品久久久久久99蜜桃| 久久久国产乱子伦精品作者| 国产成人精品免费久久久久|