RFC: Qt theme icons on Windows

Thiago Macieira thiago at macieira.org
Thu Jun 26 09:00:58 PDT 2014


Em qui 26 jun 2014, às 13:17:07, Sergey Starosek escreveu:
> Thiago, Tomaz,
> 
> Trac ticket http://trac.hohndel.org/ticket/564 reports disappearing icons
> in user manual search panel under Windows (reproducable on Win7 and WinXP).
> 
> According to this discussion
> http://stackoverflow.com/questions/12299626/qt-use-of-qt-standard-icons-from
> -within-qt-creator-on-win7 theme icons are not supported on Windows.
> 
> Possible solutions to this issue could be:
> 
>    - use unicode arrows instead of icons
>    - deliver theme icons along with ssrf
>    - package custom icons as resource
> 
> Which is the correct  one?

Either solution is fine. I guess we'd prefer an image rather than Unicode 
arrows, as otherwise we'd be at the mercy of the font and we've already had 
problems with ₂)

You're right, we can't depend on the standard icons since they may not be 
there. This is the code that uic generates:

        QString iconThemeName = QString::fromUtf8("go-previous");
        if (QIcon::hasThemeIcon(iconThemeName)) {
            icon1 = QIcon::fromTheme(iconThemeName);
        } else {
            icon1.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, 
QIcon::Off);
        }

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the subsurface mailing list