mherrmann / fbs

Create Python GUIs with Qt in minutes
https://build-system.fman.io
GNU General Public License v3.0
3.8k stars 194 forks source link

Binding Qresource to fbs? #198

Open Blakeinstein opened 4 years ago

Blakeinstein commented 4 years ago

With this as reference https://doc.qt.io/qt-5/resources.html

If by some methods to application context, we can define resources, that also are substituted in a stylesheet being set will enable cross-compatibilty of qt stylesheet with pyqt to a much higher extent.

For example: given the stylesheet https://github.com/All4Gis/Load-QSS/blob/master/examples/Light%20Blue%20(FreeCAD)/stylesheet.qss

any referenced images will be available when run using fbs run, but wont be available if the package is frozen.

Any defined references would then be accessible as :close-dark etc.

mherrmann commented 4 years ago

I understand the requirement, but don't know how it could be made to work. If you (or anybody else) finds a solution and submits it as a Pull Request, then I'd be happy to merge it.

Blakeinstein commented 4 years ago

qresources actually work in PyQt5, through the use of pyrcc5 along with a qrc file, to generate an importable python file. What I meant was, integrating it with the fbs structure. I have an idea to how to implement this, and will attempt it soon.