Results 1 to 4 of 4

Thread: .ui file name and classname

  1. #1
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default .ui file name and classname

    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?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: .ui file name and classname

    Quote Originally Posted by Rekha
    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.
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    India
    Posts
    54
    Thanks
    1
    Thanked 7 Times in 6 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: .ui file name and classname

    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.

  4. #4
    Join Date
    Aug 2006
    Location
    Zürich, Switzerland
    Posts
    23
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: .ui file name and classname

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.