bigbill
13th December 2010, 11:38
hello, I want to add some pushButtons, labels and lineEdit (in other words a form!)in the chart example.
How can I do that?
Tried with addWidget
splitter->addWidget(table);
splitter->addWidget(pieChart);
.
.
splitter->addWidget(mesLabel1);
splitter->addWidget(inputBox1);
... but the default layout was terrible.
also tried to create a layout and add it in the splitter
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(mesLabel1, 0, 0);
mainLayout->addWidget(inputBox1, 0, 1);
.
.
but the addWidget() accepts only QWidget parameter
So, how I can create a layout and add it in an (existing) QSplitter widget?
How can I do that?
Tried with addWidget
splitter->addWidget(table);
splitter->addWidget(pieChart);
.
.
splitter->addWidget(mesLabel1);
splitter->addWidget(inputBox1);
... but the default layout was terrible.
also tried to create a layout and add it in the splitter
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(mesLabel1, 0, 0);
mainLayout->addWidget(inputBox1, 0, 1);
.
.
but the addWidget() accepts only QWidget parameter
So, how I can create a layout and add it in an (existing) QSplitter widget?