• <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>
            Cpper
            C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿
            class scrollTest : public QWidget
            {
                Q_OBJECT
            public:
                scrollTest(QWidget 
            *parent = 0, Qt::WFlags flags = 0);
                
            ~scrollTest();
            private:
                
            void createWidget();
                QWidget
            * createGroupBox(const QString& title,int n);
            };

            scrollTest::scrollTest(QWidget
            * parent,Qt::WFlags flags):
            QWidget(parent,flags)
            {
                createWidget();
            }

            scrollTest::
            ~scrollTest()
            {
            }

            void scrollTest::createWidget()
            {
                resize(
            300,360);

                QGridLayout
            * gridLayout = new QGridLayout(this);
                QScrollArea
            * scrollArea = new QScrollArea(this);
                
            //scrollArea->setWidgetResizable(false);
                
            //scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
                
                QWidget
            * scrollAreaWidgetContents = new QWidget();
                
            //scrollAreaWidgetContents->setGeometry(QRect(0, 0, 380, 251));
                scrollArea->setWidget(scrollAreaWidgetContents);

                gridLayout
            ->addWidget(scrollArea, 0012);

                QSpacerItem
            * horizontalSpacer = new QSpacerItem(298,20,QSizePolicy::Expanding,QSizePolicy::Minimum);
                gridLayout
            ->addItem(horizontalSpacer, 1011);

                QPushButton
            * pushButton = new QPushButton(this);
                pushButton
            ->setText("OK");
                gridLayout
            ->addWidget(pushButton, 1111);

                QWidget
            * content = new QWidget();
                content
            ->setMinimumHeight(280);
                
            //content->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
                
                QVBoxLayout
            * vlayout = new QVBoxLayout(content);
                
            //scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
                vlayout->addWidget(createGroupBox("box1",3));
                vlayout
            ->addWidget(createGroupBox("box2",5));
                vlayout
            ->addStretch(1);

                scrollArea
            ->setWidget(content);
                
            //scrollArea->setFixedHeight(420);
            }

            QWidget
            * scrollTest::createGroupBox(const QString& title,int n)
            {
                QGroupBox
            * box = new QGroupBox(title);
                QVBoxLayout
            * boxlayout = new QVBoxLayout(box);
                
            for(int i=0;i<n;i++)
                    boxlayout
            ->addWidget(new QRadioButton(QString("%1").arg(i)));

                
            return box;
            }
            posted on 2014-12-04 13:54 ccsdu2009 閱讀(10969) 評論(1)  編輯 收藏 引用 所屬分類: QT編程
            Comments
             
            伊人久久大香线蕉无码麻豆| 色88久久久久高潮综合影院| 久久久久国产精品| 婷婷久久综合九色综合九七| 99精品国产99久久久久久97| 精品久久久久久无码专区| 久久久久久国产精品免费免费| 伊人久久综合成人网| 久久国产成人| 97久久精品人妻人人搡人人玩| 欧美成人免费观看久久| 久久精品天天中文字幕人妻| 一级做a爰片久久毛片免费陪| 91精品国产91久久综合| 久久精品aⅴ无码中文字字幕不卡| 精品精品国产自在久久高清 | 久久精品aⅴ无码中文字字幕重口| 国产69精品久久久久777| 久久久久久久久久久| 国产精品欧美亚洲韩国日本久久| 亚洲色婷婷综合久久| 中文成人无码精品久久久不卡 | 久久久久AV综合网成人| 香蕉99久久国产综合精品宅男自 | 一本久久久久久久| 久久精品国产亚洲AV嫖农村妇女| 亚洲а∨天堂久久精品| 999久久久国产精品| 久久久久国产一级毛片高清版| 国内精品伊人久久久久AV影院| 亚洲午夜久久久影院伊人| 国产精品乱码久久久久久软件| 人妻丰满?V无码久久不卡| 久久天天躁狠狠躁夜夜2020| 精品久久久久中文字幕一区| 91精品婷婷国产综合久久 | 亚洲国产精品成人AV无码久久综合影院| 色综合久久精品中文字幕首页| 狠狠色丁香久久综合婷婷| 亚洲国产成人久久综合碰碰动漫3d | 久久久国产精品网站|