×
Namespaces

Variants
Actions
(Difference between revisions)

如何保持屏幕显示避免屏保和黑屏

From Nokia Developer Wiki
Jump to: navigation, search
flycarl (Talk | contribs)
(Flycarl -)
 
hamishwillee (Talk | contribs)
m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan")
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Qt Mobility]][[Category:Code Snippet]]
+
[[Category:Qt Mobility]][[Category:Code Snippet]][[Category:Lang-Chinese]]
''Delete instructional text in italic''
+
{{Abstract|本文演示如何使程序运行时屏幕常亮,避免屏保和黑屏}}  
 
+
{{Abstract|This article explains how to ... }} ''Replace the abstract text with a short paragraph (or sentence) describing what the topic covers.''
+
  
 
== Introduction ==
 
== Introduction ==
Line 30: Line 28:
 
     }
 
     }
 
</code>
 
</code>
 +
注意使用Qt Mobility 在Pro文件中加入声明
 +
<code>
 +
 +
CONFIG += mobility
 +
MOBILITY += systeminfo
 +
</code>
 +
 +
代码示例:[[Media:Screensa.zip]]
  
== Summary ==
+
== 相关链接 ==
 +
*[[Qt 开发]]
 +
*[[Qt Quick (Chinese)]]
 +
*[[Qt Mobility 开发]]
  
  
''Enter article metadata as described below. Note that this template can be placed anywhere in the article.
 
 
{{ArticleMetaData
 
{{ArticleMetaData
  
Line 49: Line 57:
 
|creationdate= <!-- Format DD month, YYYY -->
 
|creationdate= <!-- Format DD month, YYYY -->
 
|author= [[User:flycarl]]  
 
|author= [[User:flycarl]]  
}}
+
}}[[Category:MeeGo Harmattan]] [[Category:Symbian]]

Latest revision as of 13:59, 13 June 2012

本文演示如何使程序运行时屏幕常亮,避免屏保和黑屏

[edit] Introduction

使用QMl的ScreenSaver Element可以轻松的保持屏幕常亮

import QtMobility.systeminfo 1.1
 
ScreenSaver
{
screenSaverDelayed:true
}

也可使用ScreenSaver自带的setScreenSaverDelayed(bool) 方法在适当的时候启动屏幕常亮,例如

import QtMobility.systeminfo 1.1
import com.meego 1.0
ScreenSaver
{
id:screenSaver
}
Button{
text: "on"
onClicked:screenSaver.setScreenSaverDelayed(true)
}
}

注意使用Qt Mobility 在Pro文件中加入声明

CONFIG += mobility 
MOBILITY += systeminfo

代码示例:Media:Screensa.zip

[edit] 相关链接


Article Metadata
Tested with
SDK: Qt SDK 1.1.2
Devices(s): N8,N9
Compatibility
Platform(s): Symbian^1 Symbian^3 Meego
Symbian
Article
Keywords: ScreenSaver
Created: flycarl ()
Last edited: hamishwillee (13 Jun 2012)
This page was last modified on 13 June 2012, at 13:59.
157 page views in the last 30 days.
×