Answer the question
In order to leave comments, you need to log in
Qt. How to set a fixed height layout in QGridLayout?
I am creating a 2 by 2 grid from a QGridLayout. I put QToolBar in the first line, QSplitter in the second (two more widgets there so that there is a slider between them).
main_layout = new QGridLayout{this};
toolbar = new QToolBar{this};
splitter = new QSplitter{this};
// toolbar->setFixedHeight(50);
toolbar->setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Minimum);
toolbar->addAction("test");
main_layout->addWidget(toolbar,0,0,2,1);
main_layout->addWidget(splitter,1,0,2,1);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question