Home > other >  How to access the Chinese characters in QSettings?
How to access the Chinese characters in QSettings?

Time:03-24

With the Settings. The setValue (" test ", "test"); See actual open is \ x7974 \ x7487 such characters, and I hope I can see is the test=test reading: if the input test=QString STR=Settings. The value (" test "). The toString (); , the STR is empty only know should be the problem of coding, but I hope the effect of the implementation is set up files, directly to the Windows open to see the remains of Chinese; Also, also can read the manual input of Chinese string hope you recognize thank you for your help

CodePudding user response:

There is no provide methods QSettings,

CodePudding user response:

thank you

CodePudding user response:

This really have no way to, read out the value of is correct, display does not affect the use!

CodePudding user response:

QSettings * configInfo=new QSettings (" config. Ini, QSettings: : IniFormat);//read the configuration file
ConfigInfo - & gt; SetIniCodec (" utf-8 ");//to solve the code
QString result=configInfo - & gt; The value ("/config/key "). The toString ();//read the values
  • Related