PDA

View Full Version : .ui file name and classname



Rekha
2nd August 2006, 12:24
there is a .ui file from which we can generate .h file.. example text.ui and ui_text.h..
no we are writing a text.h file for prototying the functions n variables of class.. but the class name that's been generated in ui_text.h file is different from file name.. is there anything like filename and class name should be the same?

jpn
2nd August 2006, 12:46
is there anything like filename and class name should be the same?
No, C++ does not restrict anyhow that the name of the file and the class would need to be the same.

sumsin
3rd August 2006, 14:38
Actually whatever name you have given as the Form Name, when you are desinging the form (i.e. txet.ui) through designer, becomes the class name.

And its a better practice save the file as the same name as your class name.

3dch
12th August 2006, 02:53
You can define the class name in the property inspector. Look for the "ObjectName" property. By default when you have a xyz.ui file the ObjectName is xyzClass.

Ernst