Gazebo | Ignition | Community
Ask Your Question
1

Qt Charts with ignition gui plugin

asked 2020-03-27 04:08:10 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello every one :D i had a problem with running Qt Charts on a ignition gui plugin, i mentioned it in a previous question https://answers.gazebosim.org/questio...

but now i found out that it is a common issue in Qt Charts itself, it dose not run with QGuiApplication and requires QApplication and ignition gui uses the QGuiApplication, but i tried to modify it and replace it with QApplication and it worked

Screenshot from 2020-03-27 11-07-17 Screenshot from 2020-03-27 11-06-55

....................................................

but of course it might be an invalid solution, as i don't know how it will affect the other parts of the ignition gui so , is there is any other ideas can i do to run qt charts components on QApplication without affecting the other parts of the applicaton ?

Update

ok, I modified the Application.hh & Application.cc and replaced the QGuiApplication with QApplication and modified the CMakeLists files (QApplication requires the Qt5Widgets library).

it seems to be good, the test cases are fine, i tested the ign-gui & ign-gazebo and this is the results 100% success in ign-gui , 97% success in ign-gazebo (this is the same percentage for me before the modifying)

it tested on version 3 of both of them, ign-gazebo3 & ign-gui3

gui_test gazebo_test

edit retag flag offensive close merge delete

Comments

I moved your other answer to the question under an "Update" header ๐Ÿ˜‰

chapulina gravatar imagechapulina ( 2020-03-28 11:09:50 -0500 )edit

That sounds great, thank you for testing all that! Unfortunately, that change would break ABI, so we can't add it to Blueprint (ign-gui2) or Citadel (ign-gui3). So you're welcome to open a PR against the next Ignition version, Dome, which is currently the default branch of ign-gui ๐Ÿ‘ Thanks!

chapulina gravatar imagechapulina ( 2020-03-28 11:11:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-27 11:30:40 -0500

chapulina gravatar image

Nice! Glad to see you found a workaround!

You're right that QtCharts needs QApplication, I hadn't realized that. I see 2 options:

  1. Change ign-gui to use QApplication and test all ign-gazebo plugins to verify things still work. This change breaks ABI and would need to go into the upcoming Ignition release, Dome.
  2. If the above doesn't work, we won't be able to use QtCharts and will need to look for another approach.
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-03-27 04:08:10 -0500

Seen: 611 times

Last updated: Mar 28 '20