Qt hello

QML 不同风格和主题的切换

Quick程序提供了方便的用于切换不同风格和主题的配置文件,如果没有设计稿,又想界面没那么丑,那么可以用这套配置,让应用看起来相对专业一点。

一,在 qrc 资源文件中添加 qtquickcontrols2.conf 文件。

二,编辑这个文件。

qt 共提供5种不同的风格。

1,Default Style:
默认风格,其外观和行为会随着操作系统和系统主题的变化而变化。它保持了跨平台的一致性,并且对大多数常见控件提供了自然的外观。

2,Material Style:
受 Google Material Design 影响的风格,主要用于移动应用程序。它强调了阴影、动画和响应式布局,具有现代感和生动感。

3,Universal Style:
致力于提供一种在不同操作系统上具有一致外观的风格。它适合那些希望应用程序在不同平台上保持相似外观的开发者。

4,Imagine Style:
一种受到 macOS 的设计风格启发的风格,它提供了类似 macOS 风格的外观和交互体验。

5,Fusion Style:
基于 Qt Widgets 的 Fusion 主题,提供了一种类似传统桌面应用程序的外观和行为。

每种风格还可以设置不同的属性。

1. accent,color类型,表示重点色,默认是Pink

2. primary,color类型,表示优选色,默认是Indigo

3. backbround,color类型,表示背景色,默认由主题指定(light或者dark)

4. elevation,int类型,表示海拔高度,值越大,阴影越深,该值与具体控件相关

5. foreground,color类型,表示前景色,默认值由主题指定(light或者dark)

6. theme,枚举类型,表示主题,默认是Light,也可修改为Dark

三,看下效果

1,fusion

2,Universal

3,Material

4,Imagine

5,默认风格

6,Dark主题

四,代码

https://gitcode.com/keiler20181/QMLStyle.git

4 评论

  1. XEvil 5.0 automatically solve most kind of captchas,
    Including such type of captchas: ReCaptcha v.2, ReCaptcha v.3, Hotmail, Google, Solve Media, BitcoinFaucet, Steam, Amazon, Twitter, Microsoft, Twitch, Outlook, +12000
    + hCaptcha, ArkoseLabs FunCaptcha, ReCaptcha Enterprize supported in new XEvil 6.0!

    1.) Fast, easy, precisionly
    XEvil is the fastest captcha killer in the world. Its has no solving limits, no threads number limits
    you can solve even 1.000.000.000 captchas per day and it will cost 0 (ZERO) USD! Just buy license for 59 USD and all!

    2.) Several APIs support
    XEvil supports more than 6 different, worldwide known API: 2captcha.com, anti-captchas.com (antigate), RuCaptcha, DeathByCaptcha, etc.
    just send your captcha via HTTP request, as you can send into any of that service – and XEvil will solve your captcha!
    So, XEvil is compatible with hundreds of applications for SEO/SMM/password recovery/parsing/posting/clicking/cryptocurrency/etc.

    3.) Useful support and manuals
    After purchase, you got access to a private tech.support forum, Wiki, Skype/Telegram online support
    Developers will train XEvil to your type of captcha for FREE and very fast – just send them examples

    4.) How to get free trial use of XEvil full version?
    – Try to search in Google “Home of XEvil”
    – you will find IPs with opened port 80 of XEvil users (click on any IP to ensure)
    – try to send your captcha via 2captcha API ino one of that IPs
    – if you got BAD KEY error, just tru another IP
    – enjoy! 🙂
    – (its not work for hCaptcha!)

    WARNING: Free XEvil DEMO does NOT support ReCaptcha, hCaptcha and most other types of captcha!

    http://xrumersale.site/

  2. XEvil 6.0 automatically solve most kind of captchas,
    Including such type of captchas: ReCaptcha-2, ReCaptcha-3, Hotmail (Microsoft), Google captcha, SolveMedia, BitcoinFaucet, Steam, Amazon, Twitter, Microsoft, Twitch, Outlook, +12000
    + hCaptcha, ArkoseLabs FunCaptcha, ReCaptcha Enterprize supported in new XEvil 6.0!

    1.) Fast, easy, precisionly
    XEvil is the fastest captcha killer in the world. Its has no solving limits, no threads number limits
    you can solve even 1.000.000.000 captchas per day and it will cost 0 (ZERO) USD! Just buy license for 59 USD and all!

    2.) Several APIs support
    XEvil supports more than 6 different, worldwide known API: 2captcha.com, anti-captchas.com (antigate), rucaptcha.com, DeathByCaptcha, etc.
    just send your captcha via HTTP request, as you can send into any of that service – and XEvil will solve your captcha!
    So, XEvil is compatible with hundreds of applications for SEO/SMM/password recovery/parsing/posting/clicking/cryptocurrency/etc.

    3.) Useful support and manuals
    After purchase, you got access to a private tech.support forum, Wiki, Skype/Telegram online support
    Developers will train XEvil to your type of captcha for FREE and very fast – just send them examples

    4.) How to get free trial use of XEvil full version?
    – Try to search in Google “Home of XEvil”
    – you will find IPs with opened port 80 of XEvil users (click on any IP to ensure)
    – try to send your captcha via 2captcha API ino one of that IPs
    – if you got BAD KEY error, just tru another IP
    – enjoy! 🙂
    – (its not work for hCaptcha!)

    WARNING: Free XEvil DEMO does NOT support ReCaptcha, hCaptcha and most other types of captcha!

    http://XEvil.Net/

  3. XEvil 6.0 automatically solve most kind of captchas,
    Including such type of captchas: ReCaptcha-2, ReCaptcha-3, Hotmail (Microsoft), Google captcha, Solve Media, BitcoinFaucet, Steam, Amazon, Twitter, Microsoft, Twitch, Outlook, +12k
    + hCaptcha, ArkoseLabs FunCaptcha, ReCaptcha Enterprize supported in new XEvil 6.0!

    1.) Fast, easy, precisionly
    XEvil is the fastest captcha killer in the world. Its has no solving limits, no threads number limits
    you can solve even 1.000.000.000 captchas per day and it will cost 0 (ZERO) USD! Just buy license for 59 USD and all!

    2.) Several APIs support
    XEvil supports more than 6 different, worldwide known API: 2captcha.com, anti-captchas.com (antigate), rucaptcha.com, DeathByCaptcha, etc.
    just send your captcha via HTTP request, as you can send into any of that service – and XEvil will solve your captcha!
    So, XEvil is compatible with hundreds of applications for SEO/SMM/password recovery/parsing/posting/clicking/cryptocurrency/etc.

    3.) Useful support and manuals
    After purchase, you got access to a private tech.support forum, Wiki, Skype/Telegram online support
    Developers will train XEvil to your type of captcha for FREE and very fast – just send them examples

    4.) How to get free trial use of XEvil full version?
    – Try to search in Google “Home of XEvil”
    – you will find IPs with opened port 80 of XEvil users (click on any IP to ensure)
    – try to send your captcha via 2captcha API ino one of that IPs
    – if you got BAD KEY error, just tru another IP
    – enjoy! 🙂
    – (its not work for hCaptcha!)

    WARNING: Free XEvil DEMO does NOT support ReCaptcha, hCaptcha and most other types of captcha!

    http://xrumersale.site/

  4. XEvil 6.0 automatically solve most kind of captchas,
    Including such type of captchas: ReCaptcha v.2, ReCaptcha v.3, Hotmail, Google, SolveMedia, BitcoinFaucet, Steam, Amazon, Twitter, Microsoft, Twitch, Outlook, +12k
    + hCaptcha, ArkoseLabs FunCaptcha, ReCaptcha Enterprize supported in new XEvil 6.0!

    1.) Fast, easy, precisionly
    XEvil is the fastest captcha killer in the world. Its has no solving limits, no threads number limits
    you can solve even 1.000.000.000 captchas per day and it will cost 0 (ZERO) USD! Just buy license for 59 USD and all!

    2.) Several APIs support
    XEvil supports more than 6 different, worldwide known API: 2captcha.com, anti-captchas.com (antigate), RuCaptcha, DeathByCaptcha, etc.
    just send your captcha via HTTP request, as you can send into any of that service – and XEvil will solve your captcha!
    So, XEvil is compatible with hundreds of applications for SEO/SMM/password recovery/parsing/posting/clicking/cryptocurrency/etc.

    3.) Useful support and manuals
    After purchase, you got access to a private tech.support forum, Wiki, Skype/Telegram online support
    Developers will train XEvil to your type of captcha for FREE and very fast – just send them examples

    4.) How to get free trial use of XEvil full version?
    – Try to search in Google “Home of XEvil”
    – you will find IPs with opened port 80 of XEvil users (click on any IP to ensure)
    – try to send your captcha via 2captcha API ino one of that IPs
    – if you got BAD KEY error, just tru another IP
    – enjoy! 🙂
    – (its not work for hCaptcha!)

    WARNING: Free XEvil DEMO does NOT support ReCaptcha, hCaptcha and most other types of captcha!

    http://xrumersale.site/

发表回复