QFormLayout (not able to use in qt.4.3.3)
-
I am using qt 4.3.3 version I am also not able to use QFormLayout. is it not available in QFormLayout
-
@Qt-Enthusiast said:
am using qt 4.3.3 version I am also not able to use QFormLayout. is it not available in QFormLayout
am using qt 4.3.3 version I am also not able to use QFormLayout. is it not available in q.4.3.3 and if not how to use it
-
If you check the documentation (http://doc.qt.io/qt-4.8/qformlayout.html) you will see: "Since: Qt 4.4"
Do you really have to use such an ancient Qt version? -
In that case what is the alteranative of QFormLaout ? for qt.4.3.3
-
Please take a look at the documentation I provided.
There you can find an alternative implementation using grid layout:nameLabel = new QLabel(tr("&Name:")); nameLabel->setBuddy(nameLineEdit); emailLabel = new QLabel(tr("&Name:")); emailLabel->setBuddy(emailLineEdit); ageLabel = new QLabel(tr("&Name:")); ageLabel->setBuddy(ageSpinBox); QGridLayout *gridLayout = new QGridLayout; gridLayout->addWidget(nameLabel, 0, 0); gridLayout->addWidget(nameLineEdit, 0, 1); gridLayout->addWidget(emailLabel, 1, 0); gridLayout->addWidget(emailLineEdit, 1, 1); gridLayout->addWidget(ageLabel, 2, 0); gridLayout->addWidget(ageSpinBox, 2, 1); setLayout(gridLayout);
-
Thanks and sorry I did not looked at the documenation example first