Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 14.0.2
-
None
-
Windows
Description
Selecting a non default horizontal or vertical alignment for a QButton within a grid layout generates incorrect alignment code. Very easy to reproduce. Selecting the right mouse button over the Qbutton and then selecting (for example) "Top" for vertical alignment generates the following incorrect code (note the extra prefix "Qt::AlignmentFlag::" text prepended to the alignment parameter.
gridLayout_4 = new QGridLayout(groupBox_5);
gridLayout_4->setObjectName("gridLayout_4");
sourcePathsButton = new QPushButton(groupBox_5);
sourcePathsButton->setObjectName("sourcePathsButton");
sourcePathsButton->setMaximumSize(QSize(25, 25));
sourcePathsButton->setFont(font);
sourcePathsButton->setIconSize(QSize(25, 25));
sourcePathsButton->setFlat(false);
gridLayout_4->addWidget(sourcePathsButton, 0, 1, 1, 1, Qt::AlignmentFlag::Qt::AlignmentFlag::AlignTop);
Attachments
Issue Links
- duplicates
-
QTBUG-129503 Reg->6.7.3: In Qt Designer, the widgets' Layout Alignment option is ineffective (unable to generate corresponding code)
-
- Closed
-