Important: Please read the Qt Code of Conduct -

Qt: QVBoxLayout - hitting height limitations?

  • I add height=30 widgets to the QVBoxLayout. They all look fine, correct height. however, around 550 widgets, they start to condense, with height getting shorter and shorter although i explicitly submit:

    @ widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);

    Am I hitting a hard QVBoxLayout limit around 16,000 pixels of total content height? how to I order it to stop condensing my widgets?

  • Yes, I was hitting a limit:


    where container is the widget the QVBoxLayout applies to. The container is also managed by a QScrollArea.

    This took care of the sudden hight condensation problem when reaching a threshold of x widgets in the layout.

Log in to reply