QScrollArea *area = new QScrollArea(this);
lengthLabel = new QLabel(this);lengthLabel->setGeometry(QRect(5,30,100,20));
QScrollArea *area = new QScrollArea(); area->setWidget(this);
area->show();
QScrollArea *ar = new QScrollArea();this->setLayout(GridLayout);ar->setWidget(this);
WindowData::WindowData():QScrollArea(){ GridLayout = new QGridLayout(); this->setLayout(GridLayout); setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); GridLayout->setAlignment(Qt::AlignTop); QLabel *QuantityLabel, *LengthLabel, *WidthLabel;// ... GridLayout->addWidget(QuantityLabel,0,0); GridLayout->addWidget(QuantityField,0,1); GridLayout->addWidget(LengthLabel,1,0);}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){dockWidgetB->setWidget(WindowData::getInstance()); // Возвращает указатель на клас}