Results 1 to 5 of 5

Thread: Finding QObjcects in a qApp

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Finding QObjcects in a qApp

    Quote Originally Posted by rianquinn
    When I call the function findChildren, the compiler says this function doesn't exist.
    Could you post the exact error message?

  2. #2
    Join Date
    Jan 2006
    Posts
    22
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Finding QObjcects in a qApp

    When I call the function findChildren, the compiler says this function doesn't exist.
    Seems you're one windows using MSVC6. Check qFindChildren in the docs, findChildren is not supported my MSVC6.

    Use
    Qt Code:
    1. QWidget *objectToSearch = this;
    2. QList<QPushButton> buttons = qFindChildren<QPushButton*>( this, "nameOfObj" );
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. QWidget *objectToSearch = this;
    2. QList<QPushButton> buttons = qFindChildren( this, "nameOfObj", pb );
    To copy to clipboard, switch view to plain text mode 
    Both are untested, i wrote this from memory.

    Hope this helps.

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
  •  
Qt is a trademark of The Qt Company.