I am trying to save a page settings of a printer for future use in my application

I tried this bot not worked because m_printer is not a variant type its the object QPrinter
Qt Code:
  1. objVar= m_settings.value("PrinterSettings", m_printer);
  2. m_printer = objVar.value<QPrinter>();
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. m_settings.setValue("PrinterSettings", m_printer);
To copy to clipboard, switch view to plain text mode 



How to save printer settings and re asign to next time use