QtCharts in custom Desktop app

Is it possible to gain access to Qt Charts (Qt Charts Overview | Qt Charts 5.15.8) in a custom Desktop App? I know the frameworks (qtwidgets and shotgunutils) have a bunch of widgets, but that doesn’t include charts. Obviously the charts are available on the web (Insights), but how can I access that functionality from a custom app?

I don’t know too much about it, but perhaps you could add a new tk-framework-* or extend the existing one? The framework will guarantee that QChart classes are available for import, and perhaps do some wrapping.

Following up: QtCharts is part of PySide2. SG Desktop comes with its own version of PySide2, which is missing QtCharts (and a bunch of other modules). I can’t figure out how to add Charts functionality to Desktop’s version of PySide2, and trying to import a separate version of PySide2 messes with SG’s version of it.

Any insight into getting access to missing PySide2 modules like QtCharts in a desktop app environment?

1 Like

Hi @stavernia ,

Have you tried to define your own Python Interpreter in the *.cfg file for your platform?

The names are listed here:

and will live in your $CONFIG/core folder if you want to override them.

I just skimmed through the documentation to see if there was better reference for this but could not find it; I will ask others if it exists.

Please try this out and let us know if it works for QtCharts?
Thanks!

1 Like

You could also try to install PySide2 from pip using ShotGrid’s interpreter

$path_to_python/python.exe -m pip install PySide2
2 Likes