×
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 (Bot fixing redirect link)
hamishwillee (Talk | contribs)
m (Text replace - "<code cpp>" to "<code cpp-qt>")
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
[[Category:Qt]][[Category:UI]]
+
{{Archived|timestamp=20120216050754|user=[[User:Hamishwillee|&lt;br /&gt;----]]|[[: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.}}
__NOTOC__
+
[[Category:Qt C++ UI]][[Category:UI]][[Category:Code Snippet]][[Category:MeeGo Harmattan]][[Category:Symbian]]
__NOEDITSECTION__
+
{{Abstract|This code snippets shows how to hide Symbian status and control (CBA buttons) panes.}}
{{CodeSnippet
+
 
|id=  
+
{{ArticleMetaData <!-- v1.2 -->
|platform=S60 5th Edition<br>Symbian ^3
+
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
|devices=Nokia 5800 XpressMusic, Nokia N8
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|category=Qt
+
|devices= Nokia 5800 XpressMusic, Nokia N8
|subcategory=UI
+
|sdk= Nokia Qt SDK 1.0
|creationdate=October 7, 2010
+
|platform= S60 5th Edition<br>Symbian ^3
|keywords=QWidget, Qt::WindowSoftkeysVisibleHint
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
 +
|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
 
}}
 
}}
 
==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 for Symbian installed on your platform.
 
 
==Preconditions==
 
 
* Install Nokia Qt SDK see [http://www.forum.nokia.com/Develop/Qt/Tools///]
 
  
 
==Control and status pane visible==
 
==Control and status pane visible==
Line 26: Line 32:
 
[[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-qt>
 
int main(int argc, char *argv[]) {
 
int main(int argc, char *argv[]) {
 
     QApplication app(argc, argv);
 
     QApplication app(argc, argv);
Line 43: Line 49:
 
[[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-qt>
 
int main(int argc, char *argv[]) {
 
int main(int argc, char *argv[]) {
 
     QApplication app(argc, argv);
 
     QApplication app(argc, argv);
Line 59: Line 65:
 
[[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-qt>
 
int main(int argc, char *argv[]) {
 
int main(int argc, char *argv[]) {
 
     QApplication app(argc, argv);
 
     QApplication app(argc, argv);
Line 68: Line 74:
 
}
 
}
 
</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-qt>
 
// Enable Qt::WindowSoftkeysVisibleHint flag in QMainWindow constructor
 
// Enable Qt::WindowSoftkeysVisibleHint flag in QMainWindow constructor
 
QWidget::setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
 
QWidget::setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
Line 77: Line 83:
  
 
* [http://doc.trolltech.com/4.7/qt.html#WindowType-enum WindowType enum]
 
* [http://doc.trolltech.com/4.7/qt.html#WindowType-enum WindowType enum]
* [http://doc.trolltech.com/4.7/qwidget.html QWidget]
+
* {{Qapiname|QWidget}}
* [[TSS000646 - Hiding status and control panes]]
+
* [[Archived:Hiding status and control panes using Symbian C++]]
 
+
[[Category:Code Snippet]]
+

Latest revision as of 04:14, 11 October 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.

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

Article Metadata
Tested with
SDK: Nokia Qt SDK 1.0
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 (11 Oct 2012)

Contents

[edit] 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();
}


[edit] 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();
}

[edit] 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);

[edit] See also

This page was last modified on 11 October 2012, at 04:14.
154 page views in the last 30 days.