diff --git a/doc/examples/batteryindicator/main.cpp b/doc/examples/batteryindicator/main.cpp index 2674f5de173..4d85d5cdc76 100644 --- a/doc/examples/batteryindicator/main.cpp +++ b/doc/examples/batteryindicator/main.cpp @@ -5,11 +5,14 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); BatteryIndicator w; + +//! [0] #if defined(Q_WS_S60) w.showMaximized(); #else w.show(); #endif +//! [0] return a.exec(); } diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 24940dc023d..41fbc9adeb2 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -2790,6 +2790,17 @@ \o In the \gui Properties pane, change the \gui objectName to \bold batteryLevelBar. + \o Right-click the \gui BatteryIndicator object and select + \gui {Lay Out > Lay Out Horizontally} to ensure that the battery + indicator widget size is adjusted correctly on Maemo devices. + + To adjust widget size correctly on Qt Simulator, remove the condition + from the main.cpp file (displayed in the following code snippet) and just + leave the \c {w.showMaximized();} line: + + \snippet examples/batteryindicator/main.cpp 0 + + \endlist \section1 Completing the Header File