android - 在 Qt Android 应用程序中使用 Holo 主题

标签 android c++ qt themes qt5

我有一个 Qt Android 应用程序,我想将其主题设置为 Holo(即深色变体,而不是 Holo Light)。这是 Holo Dark 主题(左)与我的应用程序现在的外观(右)之间的比较:

enter image description here enter image description here

我正在使用 Qt 5.2.0,并且我正在使用 Qt/C++(即不是 QML),但我对任何可行的方式感兴趣,无论 Qt 版本是什么,也不管它是 QML 还是 C++。

编辑:我知道使用 Ministro,它将使用“本地”主题为所有小部件创建像素图,但是是否可以告诉 Ministro 使用哪个主题

最佳答案

编辑:从 Qt 5.4 开始,现在可以通过添加 android:theme="@android:style/Theme.Holo" 选择 Holo Dark。至 <application>在 AndroidManifest.xml 中。

这适用于 Qt 5.4,但不适用于 Qt 5.2,对于 Qt 5.2,无论您为 android:theme 指定什么,主题始终是手机的默认主题。在 list 中。

所以在 AndroidManifest.xml 中,找到 <application>节点,并将其更改为:

<application android:theme="@android:style/Theme.Holo" ...

这对于 QtQuickControls 目前不可用,尽管它被带到 Qt 5.2 用于 QtWidgets。

前者在 BogDan 5.3 的 TODO 列表中。详情见他的博客:

Qt on Android Episode 1

在这里你可以找到我 friend 系统的几个截图。

非母语

enter image description here

原生

enter image description here

QtCreator

enter image description here

关于android - 在 Qt Android 应用程序中使用 Holo 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21079613/

相关文章:

android - 将android studio更新到3.0后构建不成功。错误 :Found unexpected optical bounds (red pixel)

android:unzip 下载文件

android - 如何在Android中压缩图像文件?

Android - 返回多次出现的 ArrayList 中项目的位置

Python 安装编译错误

c++ - 保存和加载非纯文本的文本文件

C++ 密码,根权限

c++ - 在客户端-服务器程序中,服务器是否可以使用 write() 函数向客户端写入多行?

qt - '神奇' QTextEdit 大小

c++ - 从另一个类访问 Qt ui