Good morning,

I have a question related to the use of QSettings and using a value in a QML dialog. I have tried different approaches where an application setting is assigned a boolean (True/False) as shown here:
Qt Code:
  1. [Patient_Info]
  2. HeightIsVisible=True
  3. HeightIsMandatory=True
  4. WeightIsVisible=True
  5. WeightIsMandatory=True
  6. ...
To copy to clipboard, switch view to plain text mode 

The configuration file is read in a C++ method, key and values saved in a QVariantMap variable which is defined as Q_PROPERTY
Qt Code:
  1. Q_PROPERTY( QVariantMap patientInfoAttributes READ getPatientInfoAttributes NOTIFY patientInfoAttributesChanged)
To copy to clipboard, switch view to plain text mode 

The variable patientInfoAttributes is accessed in the QML code as shown below, and different path of execution are executed depending on the values. In the QML code, the values are correctly treated as boolean.
Qt Code:
  1. property bool heightIsVisible : Helper.patientInfoAttributes["HeightIsVisible"]
  2. property bool heightIsMandatory : Helper.patientInfoAttributes["HeightIsMandatory"]
  3. property bool weightIsVisible : Helper.patientInfoAttributes["WeightIsVisible"]
  4. property bool weightIsMandatory : Helper.patientInfoAttributes["WeightIsMandatory"]
To copy to clipboard, switch view to plain text mode 

There is another instance, in another QML file, where a similar approach is taken, but without success. Rather than simply setting a boolean property as above, the working is shown here:
Qt Code:
  1. property var backupSelector : Helper.sessionAttributes["SelectorIsVisible"]
To copy to clipboard, switch view to plain text mode 
An alternate declaration which also works:
Qt Code:
  1. property bool backupSelector : (Helper.sessionAttributes["SelectorIsVisible"] === "true")
To copy to clipboard, switch view to plain text mode 

The following assignment always returns true regardless of the property value read using QSettings
Qt Code:
  1. property var backupSelector : Helper.sessionAttributes["SelectorIsVisible"]
To copy to clipboard, switch view to plain text mode 

I am at a lost to understand the difference in behaviour. Any suggestions?
I am using Qt5.5.1 running on a Windows 10.

Regards,
Daniel