Skip to content

Instantly share code, notes, and snippets.

@jtooker
Created June 21, 2018 16:33
Show Gist options
  • Save jtooker/06fc2e6cf7f0059342516940566b7acf to your computer and use it in GitHub Desktop.
Save jtooker/06fc2e6cf7f0059342516940566b7acf to your computer and use it in GitHub Desktop.
Child widget enabled in an unchecked QGroupBox
/********************************************************************************
** Form generated from reading UI file 'designerH16672.ui'
**
** Created by: Qt User Interface Compiler version 5.4.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef DESIGNERH16672_H
#define DESIGNERH16672_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Form
{
public:
QVBoxLayout *verticalLayout_3;
QGroupBox *groupBox;
QVBoxLayout *verticalLayout_2;
QLabel *childA;
QLabel *childB;
QFrame *childC;
QVBoxLayout *verticalLayout;
QLabel *grandchild;
QCheckBox *checkBox;
QSpacerItem *verticalSpacer;
void setupUi(QWidget *Form)
{
if (Form->objectName().isEmpty())
Form->setObjectName(QStringLiteral("Form"));
Form->resize(312, 179);
verticalLayout_3 = new QVBoxLayout(Form);
verticalLayout_3->setObjectName(QStringLiteral("verticalLayout_3"));
groupBox = new QGroupBox(Form);
groupBox->setObjectName(QStringLiteral("groupBox"));
groupBox->setCheckable(true);
verticalLayout_2 = new QVBoxLayout(groupBox);
verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2"));
childA = new QLabel(groupBox);
childA->setObjectName(QStringLiteral("childA"));
verticalLayout_2->addWidget(childA);
childB = new QLabel(groupBox);
childB->setObjectName(QStringLiteral("childB"));
verticalLayout_2->addWidget(childB);
childC = new QFrame(groupBox);
childC->setObjectName(QStringLiteral("childC"));
childC->setFrameShape(QFrame::Box);
childC->setFrameShadow(QFrame::Raised);
verticalLayout = new QVBoxLayout(childC);
verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
grandchild = new QLabel(childC);
grandchild->setObjectName(QStringLiteral("grandchild"));
verticalLayout->addWidget(grandchild);
verticalLayout_2->addWidget(childC);
verticalLayout_3->addWidget(groupBox);
checkBox = new QCheckBox(Form);
checkBox->setObjectName(QStringLiteral("checkBox"));
verticalLayout_3->addWidget(checkBox);
verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
verticalLayout_3->addItem(verticalSpacer);
retranslateUi(Form);
QObject::connect(checkBox, SIGNAL(clicked(bool)), childA, SLOT(setEnabled(bool)));
QObject::connect(checkBox, SIGNAL(clicked(bool)), grandchild, SLOT(setEnabled(bool)));
QMetaObject::connectSlotsByName(Form);
} // setupUi
void retranslateUi(QWidget *Form)
{
Form->setWindowTitle(QApplication::translate("Form", "Form", 0));
groupBox->setTitle(QApplication::translate("Form", "Group Box", 0));
childA->setText(QApplication::translate("Form", "Child A", 0));
childB->setText(QApplication::translate("Form", "Child B", 0));
grandchild->setText(QApplication::translate("Form", "Grand Child", 0));
checkBox->setText(QApplication::translate("Form", "Child A is Enabled", 0));
} // retranslateUi
};
namespace Ui {
class Form: public Ui_Form {};
} // namespace Ui
QT_END_NAMESPACE
#endif // DESIGNERH16672_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment