Hi everyone,

I have QMenu - LegendPositionSubMenu where I can choose the position of the legend on my plot, there are 4 QActions inside QActiongroup: right, left,top,bottom.
I want to save the position in Qsettings, for this I wrote writeSettings():
Qt Code:
  1. void CLegendMenu::writeSettings()
  2. {
  3. QSettings settings;
  4. settings.beginGroup("legendSettings");
  5. //add the value of CurrentPosition
  6. settings.setValue("position", CurrentPosition);
  7. settings.endGroup();
  8. }
To copy to clipboard, switch view to plain text mode 
Current position is of the enum type Position.
and I read it:
Qt Code:
  1. void CLegendMenu::readSettings()
  2. {
  3. //read the currentPosition
  4. QSettings settings;
  5. settings.beginGroup("legendSettings");
  6.  
  7. if (settings.value("position")== 0)
  8. {
  9.  
  10. }
  11. else if (settings.value("position")== 1)
  12. {
  13. }
  14. settings.endGroup();
  15. }
  16. etc....
To copy to clipboard, switch view to plain text mode 
I am stucked here, because I want check action inside the menu according to the CurrentPosition value, so it can emit signal trigged(action) and for this I have already working connection.

Thank you
I don't know how to perform it