LaurentGomila / qt-android-cmake

A simple CMake utility for building and deploying Qt based applications on Android without QtCreator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource.qrc doesn't work

sufuk opened this issue · comments

Hello my resources arent work in android apk it doesnt gve error but added icons and etc are not showed except syle files

styles/Devsion.qss styles/Hookmark.qss styles/SyNet.qss icons/backicon.png icons/back-icon2.svg

This works:
QFile styleFile(":/styles/SyNet.qss");
styleFile.open(QIODevice::ReadOnly);
QString style(styleFile.readAll());
a.setStyleSheet(style);

This doesn't work:
ui->backButton->setIcon(QIcon(":/icons/back-icon2.svg"));

Any ideas?

Hi

Does it work on desktop? Is your project linked to the QtSvg module? Do "png" icons work?

Hi it works on desktop, also png doesn't work, if I use android assets it works.

Hi it works on desktop, also png doesn't work, if I use android assets it works.

Its not about svg sadly only assets method worked for me I cannot use Resources directly.