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);
|
QApplication a(argc, argv);
|
||||||
BatteryIndicator w;
|
BatteryIndicator w;
|
||||||
|
|
||||||
|
//! [0]
|
||||||
#if defined(Q_WS_S60)
|
#if defined(Q_WS_S60)
|
||||||
w.showMaximized();
|
w.showMaximized();
|
||||||
#else
|
#else
|
||||||
w.show();
|
w.show();
|
||||||
#endif
|
#endif
|
||||||
|
//! [0]
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
@@ -2790,6 +2790,17 @@
|
|||||||
\o In the \gui Properties pane, change the \gui objectName to
|
\o In the \gui Properties pane, change the \gui objectName to
|
||||||
\bold batteryLevelBar.
|
\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
|
\endlist
|
||||||
|
|
||||||
\section1 Completing the Header File
|
\section1 Completing the Header File
|
||||||
|
Reference in New Issue
Block a user