discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Custom File Exporter

TO
Trevor Orr
Mon, Oct 16, 2023 11:30 PM

One more issue that I don't even know where to begin to try and figure out what is going on.  The mouse works fine on the Welcome and File Save As dialog boxes but it does not work at on the on the main OpenSCAD app, not in the editor, the render window, console, etc, nothing at all.  The keyboards shortcuts all work fine.  
I have tried other apps just to make sure it wasn't a system issue and other apps works fine.
I even tried removing all of my code and I get the same thing happening.  There is no error output to the shell.
Any suggestions of were to start on this issue?

On Monday, October 16, 2023 at 01:13:59 PM PDT, Trevor Orr via Discuss <discuss@lists.openscad.org> wrote:  

Yeah I guess I could have put a better subject that was more directed to the actual issue was.  Adding the new icon to the common.qrc.in file seems to have fixed the issue.
Yes, I added a new export option under File -> Export.    On Monday, October 16, 2023 at 01:02:34 PM PDT, Hans L thehans@gmail.com wrote:

On Mon, Oct 16, 2023 at 12:36 PM Jordan Brown openscad@jordan.maileater.net wrote:

What's that colon at the front of the string?

That is how Qt resources are referenced.
"By default, resources are accessible in the application under the same file name as they have in the source tree, with a :/ prefix, or by a URL with a qrc scheme."
  from: https://doc.qt.io/qt-5/resources.html#resource-collection-files-op-op-qrc
The Qt resource compiler "rcc" is automatically invoked by cmake since we set AUTORCC ON
What it does behind the scenes is basically turn those icon files etc into a bunch of byte arrays (generated C++ code) that can be compiled directly into the app, and looked up with their resource paths as keys.
You can see this generated source file under build/objects/resources.cxx  (or something like that, trying to remember off the top of my head at the moment).
I was confused at first since the original post subject (file export) doesn't really match with the actual issue (loading a Qt Resource, icon), and had to re-read a couple times to understand the problem.I thought the problem was a file could not be open for writing (export), but really it's more of a "virtual" file (resource) that couldn't be opened for reading.I assume the export is using an added button/menu item in the GUI, with its own icon.

  _______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

One more issue that I don't even know where to begin to try and figure out what is going on.  The mouse works fine on the Welcome and File Save As dialog boxes but it does not work at on the on the main OpenSCAD app, not in the editor, the render window, console, etc, nothing at all.  The keyboards shortcuts all work fine.   I have tried other apps just to make sure it wasn't a system issue and other apps works fine. I even tried removing all of my code and I get the same thing happening.  There is no error output to the shell. Any suggestions of were to start on this issue? On Monday, October 16, 2023 at 01:13:59 PM PDT, Trevor Orr via Discuss <discuss@lists.openscad.org> wrote: Yeah I guess I could have put a better subject that was more directed to the actual issue was.  Adding the new icon to the common.qrc.in file seems to have fixed the issue. Yes, I added a new export option under File -> Export. On Monday, October 16, 2023 at 01:02:34 PM PDT, Hans L <thehans@gmail.com> wrote: On Mon, Oct 16, 2023 at 12:36 PM Jordan Brown <openscad@jordan.maileater.net> wrote: What's that colon at the front of the string? That is how Qt resources are referenced. "By default, resources are accessible in the application under the same file name as they have in the source tree, with a :/ prefix, or by a URL with a qrc scheme."   from: https://doc.qt.io/qt-5/resources.html#resource-collection-files-op-op-qrc The Qt resource compiler "rcc" is automatically invoked by cmake since we set AUTORCC ON What it does behind the scenes is basically turn those icon files etc into a bunch of byte arrays (generated C++ code) that can be compiled directly into the app, and looked up with their resource paths as keys. You can see this generated source file under build/objects/resources.cxx  (or something like that, trying to remember off the top of my head at the moment). I was confused at first since the original post subject (file export) doesn't really match with the actual issue (loading a Qt Resource, icon), and had to re-read a couple times to understand the problem.I thought the problem was a file could not be open for writing (export), but really it's more of a "virtual" file (resource) that couldn't be opened for reading.I assume the export is using an added button/menu item in the GUI, with its own icon.   _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org