QSplitter size problems of widgets
I have two customwidgets ie panel, textedit. I added them in a splitter like below:
this->panel = new CalcPanel(this);
this->textEdit = new TextEdit(this);
QSplitter *splitter1 = new QSplitter(Qt::Horizontal, this); splitter1->addWidget(this->panel); splitter1->addWidget(this->textEdit); this->setFixedSize(761,851); // set fixed size for splitter
But how do I set proper sizes for panel and textedit.
BOTH these widgets appear very small in splitter. Please share your views. Thanks for your support.
Right now you are only resizing the widget containing the splitter
You should add a layout to your widget (QHBoxLayout or QVBoxLayout) and then add your splitter to that layout.
Thanks for the reply. It worked.
As of now, splitter can be moved horizontally till column width = 0 ie no content is shown. HOw do I ensure that minimum column width of contents to be shown.
The answer is in the "doc":http://qt-project.org/doc/qt-4.8/qsplitter.html#childrenCollapsible-prop