Skip to content

Conversation

@damskii9992
Copy link

No description provided.

@damskii9992 damskii9992 added [scope] bug Bug report or fix (major.minor.PATCH) [priority] highest Urgent. Needs attention ASAP labels Jun 26, 2025
Copy link
Member

@AndrewSazonov AndrewSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still discuss this, but I think the more sustainable direction is to migrate from QtCharts to QtGraphs. QtGraphs looks like the newer, better-performing QML alternative, and this would also let us avoid mixing QML with QWidget-based components, so we can keep using QGuiApplication.

By the way, are you already using QtGraphs in EasyImaging?

@damskii9992
Copy link
Author

We should still discuss this, but I think the more sustainable direction is to migrate from QtCharts to QtGraphs. QtGraphs looks like the newer, better-performing QML alternative, and this would also let us avoid mixing QML with QWidget-based components, so we can keep using QGuiApplication.

By the way, are you already using QtGraphs in EasyImaging?

Indeed, but as far as I remember, we can't upgrade to QtGraphs yet due to it lacking functionality such as logarithmic axes. And you can still use QtGraphs in a QApplication. So until we upgrade to QtGraphs, we should be using QApplication rather than QGuiApplication (the latter doesn't even work when trying to extend the templates using code from EasyReflectometry or EasyDiffraction).

In EasyImaging I am using QtGraphs and hence QGuiApplication because I don't need logarithmic axes, but for this reason I also can't re-use most of the code from EasyReflectometry or EasyDiffraction.

@AndrewSazonov
Copy link
Member

From what I see in the QtGraphs migration guide (https://doc.qt.io/qt-6/qtgraphs-migration-guide-2d.html), the two main missing features for us are:

  • Titles and legends
  • Log value axis

Log scaling isn’t currently used in diffraction, while legends are. But given the performance improvements and the richer set of replace methods in QtGraphs, I’m planning to switch EasyDiffraction to QtGraphs once I return to app development. I also expect that QtGraphs will eventually gain missing features.

This makes the migration more technique-dependent and not something we need to force across all EasyScience apps at once.

EasyApp itself is just a collection of reusable UI components. It currently includes "templates" for both QtCharts and Plotly. I’ll add QtGraphs components too, so each project can choose what fits best.

So I think the EasyApp examples should remain QGuiApplication-based by default. If needed, we can add an additional example demonstrating QtCharts explicitly (which would document the need for QApplication). I’m also in the process of updating the AdvancedPy example to include a simple QtGraphs plot.

And just to clarify, when you said

I am using QtGraphs and hence QGuiApplication because I don't need logarithmic axes, but for this reason I also can't re-use most of the code from EasyReflectometry or EasyDiffraction.

was the limitation specifically related to QtCharts requiring QApplication, or were there other components that didn’t function under QGuiApplication as well?

@rozyczko
Copy link
Member

rozyczko commented Nov 7, 2025

6.10 is apparently still missing both, so more wait

@damskii9992
Copy link
Author

damskii9992 commented Nov 7, 2025

was the limitation specifically related to QtCharts requiring QApplication, or were there other components that didn’t function under QGuiApplication as well?

Hmm, as far as I remember, the only issue I ran into was with QtCharts, but I also did not test the full scope of EasyDiffraction or EasyReflectometry, I simply tried to copy over the plots to have a starting point to work from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] highest Urgent. Needs attention ASAP [scope] bug Bug report or fix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants