it is true...
here is the code generated from QtDesigner
void setupUi
(QWidget *ImageViewerClass
) {
//...
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(scrollArea->sizePolicy().hasHeightForWidth());
scrollArea->setSizePolicy(sizePolicy);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scrollArea->setWidgetResizable(true);
scrollAreaWidgetContents
= new QWidget();
gridLayoutWidget
= new QWidget(scrollAreaWidgetContents
);
gridLayout
->setObjectName
(QString::fromUtf8("gridLayout"));
gridLayout
->setSizeConstraint
(QLayout::SetMinAndMaxSize);
gridLayout->setContentsMargins(0, 0, 0, 0);
scrollArea->setWidget(scrollAreaWidgetContents);
QScrollArea *scrollArea;
QWidget *scrollAreaWidgetContents;
QWidget *gridLayoutWidget;
QGridLayout *gridLayout;
void setupUi(QWidget *ImageViewerClass)
{
//...
scrollArea = new QScrollArea(ImageViewerClass);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(scrollArea->sizePolicy().hasHeightForWidth());
scrollArea->setSizePolicy(sizePolicy);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scrollArea->setWidgetResizable(true);
scrollAreaWidgetContents = new QWidget();
gridLayoutWidget = new QWidget(scrollAreaWidgetContents);
gridLayout = new QGridLayout(gridLayoutWidget);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
gridLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
gridLayout->setContentsMargins(0, 0, 0, 0);
scrollArea->setWidget(scrollAreaWidgetContents);
To copy to clipboard, switch view to plain text mode
I dont know where i can find more information (looked into api, qt-book, goole)
Bookmarks