qt android 开机启动,Qt for android 开机自启动、开机黑屏处理

1:开机自启动

1.1 创建AndroidManifest.xml

项目->构建->Build Android APK->Use Gradle->Create Templates->打钩Copy the Gra...->完成

1.2 添加内容

1.3 编译运行即可开机运行。

2:开机黑屏处理

一张logo页面运行

2.1在工程目录下添加启动图片 Android/res/drawable-hdpi/splash.png

2.2  在工程目录下添加一个android/res/values/Styles.xml文件

@drawable/splash

true

true

true

2.3  然后在AndroidManifest.xml中的activity中加上

android:theme="@style/Theme.AppStartLoad"

2.4 在AndroidManifest.xml中的application中加上android:theme = "@style/Theme.AppStartLoadTranslucent"

2.5 然后添加下面的内容,不然当主界面内容比较多时,依旧会出现黑屏问题。

闪烁运行

2.1 新建styles.xml,新建一个MyAppTheme主题,写入内容:

true

@null

@null

false

@null

2.2 在AndroidManifest.xml文件,选择「XML Source」显示源码,在application节点上添加「android:theme="@style/MyAppTheme"」,保存。

android:name="org.qtproject.qt5.android.bindings.QtApplication"

android:label="quitDemo"

android:theme="@style/MyAppTheme">

备注:网上搜到的可用方法,暂时没研究原理,懂得请留言,指导指导!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值