0

I'm working on a syntax highlighter getting styles to apply from an xml file.

I wanted to add this file in the qrc but I would like this file to be editable by the user.

How to get the benefit of the qrc to avoid path management from the exe ?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Maluna34
  • 245
  • 1
  • 16
  • 1
    I think you can load and edit resources at runtime, but AFAIK there's no way to save them back in the executable file. – p-a-o-l-o Apr 11 '19 at 08:14
  • I don't know if it's possible to manage paths properly with QResource ? – Maluna34 Apr 11 '19 at 08:42
  • 2
    I think [`QSettings`](https://doc.qt.io/qt-5/qsettings.html) might be more appropriate here. Perhaps load the default value(s) from bound resources and save the edited values on a per-user base via `QSettings`. – G.M. Apr 11 '19 at 09:12
  • 1
    Another possibility could be to use QResource directly, and register resources you would like. Not checked, though, but it might be possible to set resources you like at run-time. More information can be found here: https://doc.qt.io/qt-5/qresource.html#registerResource . Of course, you would still have to introduce your resources in some way. But maybe through management of them as files, and registering/unregistering them you would be able to achieve that users would be able to edit them at run-time? – Vaidotas Strazdas Apr 16 '19 at 09:17

0 Answers0