pvbrowser manual
Back Content Forward

Layout management

Layout management is defined within pvdevelop. Please select the according menu (right mouse button) within the graphical designer of pvdevelop.

Here is an example code for layout management.

pvQLayoutHbox(p,ID_MAIN_WIDGET,-1);                   // horizontally layout all widgets

pvQLayoutVbox(p,layout1,ID_MAIN_WIDGET);              // create a vertical box layout 
                                                      // parent is main widget

pvQLayoutHbox(p,layout2,layout1);                     // create a horizontal box layout
                                                      // parent is layout1

pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout1,-1,-1);  // put layout1 into the main layout
pvAddWidgetOrLayout(p,layout1,upperWidget,-1,-1);     // add the upperWidget
pvAddWidgetOrLayout(p,layout1,layout2,-1,-1);         // add layout2 below the upperWidget
pvAddWidgetOrLayout(p,layout2,leftWidget,-1,-1);      // add the reamining widgets from left to right

This results in the following layout.


Back Content Forward