pvbrowser manual
Zurück Inhalt Vor

Layout Management

Das Layout Management kann in pvdevelop festgelegt werden. Wählen Sie dazu das entsprechende Menu (rechte Maustaste) in graphischen Designer von pvdevelop aus.

Hier ist ein Beispielcode für das 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
pvAddWidgetOrLayout(p,layout2,centerWidget,-1,-1);
pvAddWidgetOrLayout(p,layout2,rightWidget,-1,-1);

Dies führt zu folgendem Layout.

Layout
Layout

Zurück Inhalt Vor