97 QVBoxLayout* layout =
new QVBoxLayout;
98 layout->addWidget(myAccordion);
102 int firstPaneIndex = myAccordion->
addContentPane(
"My first content pane");
104 if (firstPaneIndex != -1) {
108 contentFrame->setLayout(
new QVBoxLayout());
110 contentFrame->layout()->addWidget(
new QLabel(
"Hello Cute World!!!"));
114 int secondPaneIndex = myAccordion->
addContentPane(
"Basic settings");
116 if (secondPaneIndex != -1) {
120 contentFrame->setLayout(
new QVBoxLayout());
122 QLineEdit* led =
new QLineEdit();
123 QLineEdit* led2 =
new QLineEdit();
124 contentFrame->layout()->addWidget(
new QLabel(
"Name:"));
125 contentFrame->layout()->addWidget(led);
126 contentFrame->layout()->addWidget(
new QLabel(
"Living place:"));
127 contentFrame->layout()->addWidget(led2);
137 contentFrame->setMaximumHeight(500);
139 contentFrame->setLayout(
new QVBoxLayout());
141 QCheckBox* cb =
new QCheckBox();
142 cb->setText(
"Option 1");
143 QCheckBox* cb2 =
new QCheckBox();
144 cb2->setText(
"Option 2");
145 QCheckBox* cb3 =
new QCheckBox();
146 cb3->setText(
"Option 3");
147 QCheckBox* cb4 =
new QCheckBox();
148 cb4->setText(
"Option 4");
149 QCheckBox* cb5 =
new QCheckBox();
150 cb5->setText(
"Option 5");
151 QCheckBox* cb6 =
new QCheckBox();
152 cb6->setText(
"Option 6");
153 QCheckBox* cb7 =
new QCheckBox();
154 cb7->setText(
"Option 7");
155 contentFrame->layout()->addWidget(cb);
156 contentFrame->layout()->addWidget(cb2);
157 contentFrame->layout()->addWidget(cb3);
158 contentFrame->layout()->addWidget(cb4);
159 contentFrame->layout()->addWidget(cb5);
160 contentFrame->layout()->addWidget(cb6);
161 contentFrame->layout()->addWidget(cb7);
QFrame * getContentFrame()
Get the content frame of the content pane.
void setMaximumHeight(int maxHeight)
Set the maximum height of the content pane container.