Qt World Summit: Submit your Presentation

Main layouts missing

  • Hello all,

    I am a beginner at Qt. I am following the example at http://doc.qt.io/qt-4.8/designer-quick-start.html entitled "A Quick Start to Qt Designer." I can mostly complete the exercise, but I always have a broken main layout that does not allow the form to be resized correctly when previewed. About half way into it, the tutorial says, and I quote:

    "Note: Main layouts cannot be seen on the form. To check if you have a main layout installed, try resizing your form; your widgets should resize accordingly. Alternatively, you can take a look at Qt Designer's Object Inspector. If your top level widget does not have a layout, you will see the broken layout icon next to it, "

    I cannot for the life of me get a main layout, and I always get a broken layout icon in the Object Inspector. Can somebody please shine some daylight my way? Is there a way to add a main layout? The problem is that the tutorial is a little bit dated, and it says in the beginning "You start by choosing Widget from the New Form dialog." As far as I can tell, there is no New Form dialog, and I can't get the equivalent for Qt 5 to work.

  • Moderators

    Do a right-click on your main windget, go to "Lay out" submenu and choose the appropriate option (vertical, horizontal, form or grid layout). That's all.

Log in to reply