Results 1 to 3 of 3

Thread: How to know the object names of any generic application ?

  1. #1
    Join Date
    Sep 2008
    Location
    Chennai
    Posts
    36
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default How to know the object names of any generic application ?

    If we develop an application window, which contains different controls such as line edits, label boxes and other objects, created statically (using drag and drop method). How to get the names of the objects present in the application ? ....
    Should I have to read the corresponding header file, which present in the .ui directory ??? Is there any other way to get those object names, because I want to know for a generic application ?????

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to know the object names of any generic application ?

    Did you come across QObject::objectName ???
    You can directly call this function from any widget..

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to know the object names of any generic application ?

    also take look at the other QObject and QMetaObject (you can get meta object by QObject::metaObject() methods. Some might be useful to get through the complex widget which structure you don't know:
    - inherits()
    - findChild()
    - findChildren()
    - etc
    QMetaObject:
    - className()
    - classInfo()
    - etc
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. Replies: 4
    Last Post: 19th February 2009, 11:10
  2. object files' names collision
    By PowerKiKi in forum Qt Programming
    Replies: 7
    Last Post: 30th October 2007, 21:32
  3. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  4. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  5. Application very heavy for lots object
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 29th April 2006, 17:33

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.