• <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 閱讀(10958) 評論(1)  編輯 收藏 引用 所屬分類: QT編程
            Comments
             
            99久久国产精品免费一区二区| 国产精品青草久久久久福利99| 99久久国产综合精品五月天喷水| 亚洲精品午夜国产va久久| 9191精品国产免费久久| 99国产精品久久| 久久99国产综合精品女同| 99久久国产综合精品女同图片| 久久亚洲AV无码精品色午夜| 久久国产亚洲精品| 精品综合久久久久久97| 色综合久久久久久久久五月| 伊人久久大香线蕉亚洲| 久久精品国产亚洲AV无码娇色| 精品国产乱码久久久久久郑州公司| 久久精品国产久精国产思思| 久久夜色精品国产噜噜麻豆| 久久亚洲精品视频| 久久成人国产精品一区二区| 久久天天躁狠狠躁夜夜不卡| 久久精品国产亚洲AV香蕉| 久久综合给合久久国产免费 | 亚洲欧美日韩久久精品第一区| 一本一本久久aa综合精品| AV无码久久久久不卡网站下载 | 久久精品国产乱子伦| 久久久久亚洲av无码专区| 伊人色综合久久天天| 久久人妻少妇嫩草AV蜜桃| 久久精品国产免费一区| 久久免费香蕉视频| 欧洲成人午夜精品无码区久久| 久久九九亚洲精品| 久久久久亚洲AV无码专区首JN| 国产精品久久久久9999| 国内精品久久久久影院亚洲| 国内精品伊人久久久久AV影院| 久久人人爽人人澡人人高潮AV| 潮喷大喷水系列无码久久精品| 无码精品久久一区二区三区| 久久精品国产久精国产|