forked from qt-creator/qt-creator
Doc - Add info about layouts to the example
Reviewed-by: Niels Weber
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user