Skip to content

Commit cce1fab

Browse files
mchehabmasahir0y
authored andcommitted
kconfig: qconf: fix the content of the main widget
The port to Qt5 tried to preserve the same way as it used to work with Qt3 and Qt4. However, at least with newer versions of Qt5 (5.13), this doesn't work properly. Change the schema by adding a vertical layout, in order for it to start working properly again. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 5752ff0 commit cce1fab

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

scripts/kconfig/qconf.cc

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,21 +1360,32 @@ ConfigMainWindow::ConfigMainWindow(void)
13601360
if ((x.isValid())&&(y.isValid()))
13611361
move(x.toInt(), y.toInt());
13621362

1363-
split1 = new QSplitter(this);
1363+
QWidget *widget = new QWidget(this);
1364+
QVBoxLayout *layout = new QVBoxLayout(widget);
1365+
setCentralWidget(widget);
1366+
1367+
split1 = new QSplitter(widget);
13641368
split1->setOrientation(Qt::Horizontal);
1365-
setCentralWidget(split1);
1369+
split1->setChildrenCollapsible(false);
13661370

1367-
menuView = new ConfigView(split1, "menu");
1371+
menuView = new ConfigView(widget, "menu");
13681372
menuList = menuView->list;
13691373

1370-
split2 = new QSplitter(split1);
1374+
split2 = new QSplitter(widget);
1375+
split2->setChildrenCollapsible(false);
13711376
split2->setOrientation(Qt::Vertical);
13721377

13731378
// create config tree
1374-
configView = new ConfigView(split2, "config");
1379+
configView = new ConfigView(widget, "config");
13751380
configList = configView->list;
13761381

1377-
helpText = new ConfigInfoView(split2, "help");
1382+
helpText = new ConfigInfoView(widget, "help");
1383+
1384+
layout->addWidget(split2);
1385+
split2->addWidget(split1);
1386+
split1->addWidget(configView);
1387+
split1->addWidget(menuView);
1388+
split2->addWidget(helpText);
13781389

13791390
setTabOrder(configList, helpText);
13801391
configList->setFocus();

0 commit comments

Comments
 (0)