When generating cpp code from .ui files, uic has to map elements/properties of the widgets to methods on the object.

For example if I have a widget declaration

Qt Code:
  1. <widget class="QPushButton" name="button">
  2. <property name="geometry">
  3. <rect>
  4. <x>910</x>
  5. <y>140</y>
  6. <width>101</width>
  7. <height>117</height>
  8. </rect>
  9. </property>
  10. <property name="flat">
  11. <bool>true</bool>
  12. </property>
  13. </widget>
To copy to clipboard, switch view to plain text mode 

I get some cpp code like:

Qt Code:
  1. button = new QPushButton(MainUI);
  2. button->setObjectName(QString::fromUtf8("button"));
  3. button->setGeometry(QRect(910, 140, 101, 117));
  4. button->setFlat(true);
To copy to clipboard, switch view to plain text mode 

I'm wondering how uic knows which elements/properties of the .ui file are mapped to the methods on the objects? I had a quick look at the uic source and the logic seemed to be hard coded in the source rather than a declarative config of rules that could be changed when uic undergoes an upgrade or the Qt API changes.

Does anybody know of a list that specifies how uic maps .UI XML to cpp code?

Regards