qt-resource

.rcc file not found when trying to call registerSource

做~自己de王妃 提交于 2019-12-24 12:50:43
问题 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, const QString & mapRoot = QString()) : QResource::registerResource("redTheme.rcc") The method returns false . Do I need to set a path or something similar? Note that I'm using MSVC 2013 with CMake . According to this post, it could be a problem. 回答1:

Large Qt external binary resource file

こ雲淡風輕ζ 提交于 2019-12-23 02:07:12
问题 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 before it hangs and crash on my computer. I would really want to make on big file as this makes it a lot easier when uploading expansion files for Android. I run the rcc tool from the commandline with the following arguments: rcc -binary -no

Can i read from .ini file which located in resources files?

独自空忆成欢 提交于 2019-12-22 08:52:58
问题 #include "mainwindow.h" #include "ui_mainwindow.h" #include <QSettings> #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QSettings * qsettings = new QSettings(":/config.ini",QSettings::IniFormat); bool status = qsettings->value("preview","").toBool(); qDebug() << status; } MainWindow::~MainWindow() { delete ui; } Once i could do it but now i don't know whats wrong. When i googled this problem i just saw that this

Force rcc-ing of qrc file on each build

两盒软妹~` 提交于 2019-12-08 04:42:48
问题 How to force rcc-ing of a qrc file on each build in Visual Studio 2015? We are embedding the resources in the binary, so if something like qml or image assets change, we need to run rcc to get a fresh .cpp file for the current state. I see several options - brutally touching the .qrc file in a pre build event, running a script which checks everything in the asset folder before build and checking the timestamps and comparing them to a state at the previous build. Are there cleaner and more

Can i read from .ini file which located in resources files?

走远了吗. 提交于 2019-12-05 13:45:37
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QSettings> #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QSettings * qsettings = new QSettings(":/config.ini",QSettings::IniFormat); bool status = qsettings->value("preview","").toBool(); qDebug() << status; } MainWindow::~MainWindow() { delete ui; } Once i could do it but now i don't know whats wrong. When i googled this problem i just saw that this impossible but i enshure that i did it before. This works like a charm for me: main.qrc <!DOCTYPE RCC><RCC