scrollArea
->setObjectName
(QString::fromUtf8("scrollArea"));
scrollArea
->setGeometry
(QRect(1050,
168,
208,
684));
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
scrollArea->setSizePolicy(sizePolicy);
scrollArea
->setStyleSheet
(QString::fromUtf8("background-color: rgb(255, 255, 255);"));
scrollArea
->setFrameShadow
(QFrame::Sunken);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
scrollArea->setWidgetResizable(true);
scrollArea->setAlignment(Qt::AlignJustify|Qt::AlignTop);
scrollAreaWidgetContents
= new QWidget();
scrollAreaWidgetContents
->setObjectName
(QString::fromUtf8("scrollAreaWidgetContents"));
scrollAreaWidgetContents
->setGeometry
(QRect(0,
0,
206,
682));
Code for placing groupbox in scrollarea..
void mainwindow::creatDatabaseBox()
{
static int cCnt = 0;
static int yAxis = 30;
++cCnt;
databaseGrpBox
= new QGroupBox(ui.
scrollAreaWidgetContents);
databaseGrpBox
->setObjectName
(QString("dataBaseGrpBox%1").
arg(cCnt
));
databaseGrpBox
->setGeometry
(QRect(10,yAxis,
174,
50));
databaseGrpBox->setTitle("QString("dataBaseGrpBox%1").arg(cCnt)");
yAxis = YAxis+55;
}
scrollArea = new QScrollArea(centralwidget);
scrollArea->setObjectName(QString::fromUtf8("scrollArea"));
scrollArea->setGeometry(QRect(1050, 168, 208, 684));
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
scrollArea->setSizePolicy(sizePolicy);
scrollArea->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);"));
scrollArea->setFrameShadow(QFrame::Sunken);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
scrollArea->setWidgetResizable(true);
scrollArea->setAlignment(Qt::AlignJustify|Qt::AlignTop);
scrollAreaWidgetContents = new QWidget();
scrollAreaWidgetContents->setObjectName(QString::fromUtf8("scrollAreaWidgetContents"));
scrollAreaWidgetContents->setGeometry(QRect(0, 0, 206, 682));
Code for placing groupbox in scrollarea..
void mainwindow::creatDatabaseBox()
{
static int cCnt = 0;
static int yAxis = 30;
++cCnt;
databaseGrpBox = new QGroupBox(ui.scrollAreaWidgetContents);
databaseGrpBox->setObjectName(QString("dataBaseGrpBox%1").arg(cCnt));
databaseGrpBox->setGeometry(QRect(10,yAxis,174,50));
databaseGrpBox->setTitle("QString("dataBaseGrpBox%1").arg(cCnt)");
yAxis = YAxis+55;
}
To copy to clipboard, switch view to plain text mode
This will be called when a connection button is pressed..
Bookmarks