Hello,
I am having some problems with the widgets proportions in different QSplitter.
I have 3 Qsplitter and four widgets of different classes (QTreeWidget, QFrame, QTableWidget and QWidget). I create the whole structure in QtDesigner having the design and hierarchy shown in pictures 1 & 2.
The problems arrive when I want to set the widgets size before the window is shown. I have the following lines in order to try and have the figure shown in picture 3, 1/3 of the space for the first widget and 2/3 for the second one in each splitter.
ui->treeSplitter->setStretchFactor(0, 1);
ui->treeSplitter->setStretchFactor(1, 2);
ui->logSplitter->setStretchFactor(0, 1);
ui->logSplitter->setStretchFactor(1, 2);
ui->tableSplitter->setStretchFactor(0, 1);
ui->tableSplitter->setStretchFactor(1, 2);
ui->treeSplitter->setStretchFactor(0, 1);
ui->treeSplitter->setStretchFactor(1, 2);
ui->logSplitter->setStretchFactor(0, 1);
ui->logSplitter->setStretchFactor(1, 2);
ui->tableSplitter->setStretchFactor(0, 1);
ui->tableSplitter->setStretchFactor(1, 2);
To copy to clipboard, switch view to plain text mode
Is there something I am missing? Could you point me out where the problem could be?
Thanks in advance.
1.png2.png3.jpg
Bookmarks