qt-android-cmake icon indicating copy to clipboard operation
qt-android-cmake copied to clipboard

Resource.qrc doesn't work

Open sufuk opened this issue 3 years ago • 3 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?

sufuk avatar Oct 09 '21 12:10 sufuk

Hi

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

LaurentGomila avatar Oct 11 '21 06:10 LaurentGomila

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

sufuk avatar Oct 14 '21 12:10 sufuk

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.

sufuk avatar Dec 04 '21 20:12 sufuk