×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Hiding status and control panes in Qt for Symbian

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Addition to article of: Category:MeeGo Category:Symbian. (Add platform categories))
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update)
Line 1: Line 1:
[[Category:Qt]][[Category:UI]]
+
{{Archived|timestamp=20120216050754|user=[[User:Hamishwillee|<br />----]]|[[:Category:Qt Quick|Qt Quick]] should be used for all UI development on mobile devices. The approach described in this article (based on {{Qapiname|QWidget}}) is deprecated.}}
 +
[[Category:QWidget UI]][[Category:UI]]
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
{{ArticleMetaData
+
{{ArticleMetaData <!-- v1.2 -->
|id=
+
|platform=S60 5th Edition<br>Symbian ^3
+
|devices=Nokia 5800 XpressMusic, Nokia N8
+
|category=Qt
+
|subcategory=UI
+
|creationdate=October 7, 2010
+
|keywords=QWidget, Qt::WindowSoftkeysVisibleHint
+
 
+
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
+
|devices= Nokia 5800 XpressMusic, Nokia N8
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
+
|platform= S60 5th Edition<br>Symbian ^3
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) -->
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|author=[[User:Tepaa]]
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= QWidget, Qt::WindowSoftkeysVisibleHint
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20101007
 +
|author= [[User:Tepaa]]
 +
<!-- The following are not in current metadata -->
 +
|subcategory= UI
 
}}
 
}}
  
Line 24: Line 32:
 
Following code snippets shows how to hide Symbian status and control (CBA buttons) panes.
 
Following code snippets shows how to hide Symbian status and control (CBA buttons) panes.
  
'''Note''': In order to use this code, you need to have Qt for Symbian installed on your platform.
+
'''Note''': In order to use this code, you need to have Qt installed on your platform.
  
 
==Preconditions==
 
==Preconditions==
Line 34: Line 42:
 
[[File:ShowMaximized.png]]
 
[[File:ShowMaximized.png]]
  
Execute QMainWindow as show maximized mode, call <tt>QMainWindow::showMaximized()</tt>
+
Execute QMainWindow as show maximized mode, call {{Icode|QMainWindow::showMaximized()}}
 
<code cpp>
 
<code cpp>
 
int main(int argc, char *argv[]) {
 
int main(int argc, char *argv[]) {
Line 51: Line 59:
 
[[File:ShowFullScreen.png]]
 
[[File:ShowFullScreen.png]]
  
Execute QMainWindow as fullscreen mode, call <tt>QMainWindow::showFullScreen()</tt>
+
Execute QMainWindow as fullscreen mode, call {{Icode|QMainWindow::showFullScreen()}}
 
<code cpp>
 
<code cpp>
 
int main(int argc, char *argv[]) {
 
int main(int argc, char *argv[]) {
Line 67: Line 75:
 
[[File:ShowFullScreenAndCBA.png]]
 
[[File:ShowFullScreenAndCBA.png]]
  
Execute QMainWindow as fullscreen mode, call <tt>QMainWindow::showFullScreen()</tt>
+
Execute QMainWindow as fullscreen mode, call {{Icode|QMainWindow::showFullScreen()}}
 
<code cpp>
 
<code cpp>
 
int main(int argc, char *argv[]) {
 
int main(int argc, char *argv[]) {
Line 76: Line 84:
 
}
 
}
 
</code>
 
</code>
Define control pane as visible in fullscreen mode, set <tt>Qt::WindowSoftkeysVisibleHint</tt> window flag into <tt>QMainWindow</tt>
+
Define control pane as visible in fullscreen mode, set {{Icode|Qt::WindowSoftkeysVisibleHint}} window flag into {{Icode|QMainWindow}}
 
<code cpp>
 
<code cpp>
 
// Enable Qt::WindowSoftkeysVisibleHint flag in QMainWindow constructor
 
// Enable Qt::WindowSoftkeysVisibleHint flag in QMainWindow constructor

Revision as of 08:07, 16 February 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Qt Quick should be used for all UI development on mobile devices. The approach described in this article (based on QWidget) is deprecated.


Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic, Nokia N8
Compatibility
Platform(s): S60 5th Edition
Symbian ^3
Symbian
Article
Keywords: QWidget, Qt::WindowSoftkeysVisibleHint
Created: tepaa (07 Oct 2010)
Last edited: hamishwillee (16 Feb 2012)

Overview

Following code snippets shows how to hide Symbian status and control (CBA buttons) panes.

Note: In order to use this code, you need to have Qt installed on your platform.

Preconditions

  • Install Nokia Qt SDK see [1]

Control and status pane visible

ShowMaximized.png

Execute QMainWindow as show maximized mode, call QMainWindow::showMaximized()

int main(int argc, char *argv[]) {
QApplication app(argc, argv);
MainWindow w;
w.showMaximized();
return app.exec();
}


Hide control and status pane

No control or status pane visible.

ShowFullScreen.png

Execute QMainWindow as fullscreen mode, call QMainWindow::showFullScreen()

int main(int argc, char *argv[]) {
QApplication app(argc, argv);
MainWindow w;
w.showFullScreen();
return app.exec();
}

Hide status pane

Only control pane is visible.

ShowFullScreenAndCBA.png

Execute QMainWindow as fullscreen mode, call QMainWindow::showFullScreen()

int main(int argc, char *argv[]) {
QApplication app(argc, argv);
MainWindow w;
w.showFullScreen();
return app.exec();
}

Define control pane as visible in fullscreen mode, set Qt::WindowSoftkeysVisibleHint window flag into QMainWindow

// Enable Qt::WindowSoftkeysVisibleHint flag in QMainWindow constructor
QWidget::setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);

See also

157 page views in the last 30 days.
×