Questions tagged [qt-resource]

From Qt website : « The Qt resource system is a platform-independent mechanism for storing binary files in the application's executable. This is useful if your application always needs a certain set of files (icons, translation files, etc.) and you don't want to run the risk of losing the files. »

From Qt website : « The Qt resource system is a platform-independent mechanism for storing binary files in the application's executable. This is useful if your application always needs a certain set of files (icons, translation files, etc.) and you don't want to run the risk of losing the files. »

Useful link

29 questions
1
vote
1 answer

Can not read file with extern type and resource system

I want to read a json file via Qt resource system in a c++ class. Assume Translator.h: class Translator { public: Translator(); void read(const QString &fpath); QString valueAt(const QString &key) const; …
IMAN4K
  • 1,265
  • 3
  • 24
  • 42
1
vote
1 answer

.rcc file not found when trying to call registerSource

I have generated a .rcc file using the following command: rcc -binary redTheme/redTheme.qrc -o redTheme.rcc I then put the redTheme.rcc file into the binary folder. Finally, I register the file with registerResource(const QString & rccFileName,…
Grégoire Borel
  • 1,880
  • 3
  • 33
  • 55
1
vote
2 answers

Large Qt external binary resource file

I want to use a Qt external resource file as an expansion file for my Android app. The total size of the resource to be bundled in the resource file is 700+ MB. I have experienced that the resource compiler (rcc) can not handle more than about 500MB…
uniquenamehere
  • 1,869
  • 3
  • 31
  • 60
1
vote
1 answer

QML Component 'Video' can not play video files from Qt resource files

Whole project can be found here: QML Video Test Project I have made an example application with three buttons one image and one video player. When pressing the buttons a video is supposed to play. This is what distinguishes the buttons: Access a…
uniquenamehere
  • 1,869
  • 3
  • 31
  • 60
0
votes
1 answer

Image from resource is not loading in Qt QML

I'm working on a Qt QML project, and I'm trying to display a simple image within my window, but nothing is displayed except for an empty window. I put my image in a resource file (qrc), and I provided the source with its exact path. Main.qml import…
Jung San
  • 25
  • 6
0
votes
0 answers

Resource on embedded linux not available

I build a simple test project with qt creator. Just a window, a button and an icon. The icon (stopbutton.svg) is in an resource file. In qtcreator I have setup two kids, one fore desktop-linux and one for the embedded-linux system. In the project…
Hartje
  • 1
  • 2
0
votes
2 answers

QFile testing for existence of qrc resource

I read on the Qt forums that QFile::exists can be used to test for existence of an image resource. In my project I have a lot of images, one of the references in a QML file is to: qrc:/images/ImageViewer/viewer_camera_rear2_off.png I've checked in…
SPlatten
  • 5,334
  • 11
  • 57
  • 128
0
votes
1 answer

Failing to use DefineClass (JNI) with a Qt Resource

I'm attempting to use DefineClass which is part of the Java Native Interface. The method takes a const jbyte* which is a const signed char* and I'm trying to parse it from a Qt resource. But there has to be something wrong, as ExceptionDescribe()…
Dome
  • 3
  • 2
0
votes
1 answer

Qt application not working with qrc prefixes

I think I'm missing some fundamental way of working with various prefixes in the Qt Creator qrc environment. If I place a qml component in the default prefix, the application builds and runs fine. But if I add a new prefix and then add a new…
Steve H
  • 5,479
  • 4
  • 20
  • 26
0
votes
0 answers

Creating a Qt install package with InnoSetup : missing images

I'm developing a Qt app in Qt Creator. I'm creating an install package via InnoSetup. And everything works OK except all the images are missing in the installed program (running it in Qt Creator works fine). I'm using The Qt Resource System In my…
madasionka
  • 812
  • 2
  • 10
  • 29
0
votes
0 answers

Qt how to embedded image resource in custom widget plugin dll and make it available in qt designer resource chooser dialog

I have implemented a qt custom widget (MyWidget) plugin which can be used in qt designer. There is a property IconImg of MyWidget with which user can provide an image file to change the icon of MyWidget. Now, I want to embedded several default…
ricky
  • 2,058
  • 4
  • 23
  • 49
0
votes
1 answer

Why more than one files can use same alias in Qt .qrc?

I just tried to add same alias to the different files in Qt Resource File. I expected it couldn't be done. But it is succeeded. Now I'm wondering how Qt knows which file to refer when ask to refer the file using alias. And I tried to use same…
Hareen Laks
  • 1,432
  • 2
  • 17
  • 33
0
votes
0 answers

Qt application not displaying my image

Within the Qt application I created, I added a .jpeg image. When I run the application on any other system other than mine, I do not see the image in the app window. How do I rectify this issue ? I am not well versed with Qt, so please give me a…
Daylite
  • 499
  • 1
  • 7
  • 19
-1
votes
0 answers

Unable to load files using resource File

I am trying to use a qrc (resource) file to load ui icons and fonts I want to use. rvnsrc.qrc: Sources/Images/downarrow.png Sources/Images/left-hover.png
1
2