Results 1 to 7 of 7

Thread: Question about QMetaMethod

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Question about QMetaMethod

    Thanks you,
    Yes I understand why.
    My error it is that in Documentation, the names are present. Examble, textChanged appear :
    Qt Code:
    1. void QLineEdit::textChanged ( const QString & text )
    To copy to clipboard, switch view to plain text mode 

    Certain parameters are regarded as "useless" since the name is not present in the header ?
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

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

    Default Re: Question about QMetaMethod

    Quote Originally Posted by jlbrd
    Certain parameters are regarded as "useless" since the name is not present in the header ?
    No, you just don't have to provide parameter names in headers.

  3. #3
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Question about QMetaMethod

    You are right. It is not necessary to put the names of the parameters but :

    1. Why write certain names and not others on headers.
    2. Especially why create a function which is not always useful ( QMetaMethod:: parameterNames()).
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

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

    Default Re: Question about QMetaMethod

    Quote Originally Posted by jlbrd
    Why write certain names and not others on headers.
    Because there are many developers and some write signal parameter names and some don't? I think that simply nobody thought that somebody might need them.

    Quote Originally Posted by jlbrd
    Especially why create a function which is not always useful ( QMetaMethod:: parameterNames()).
    Actually all functions aren't always useful.

    If you really concerned about this, send a suggestion to the Trolls that they should add missing parameter names or even create a patch for it.

  5. #5
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Question about QMetaMethod

    Ok thank you,for your information, I explain why I need some (even if you cannot help me !) :

    I work on QIde, a IDE for Qt4. With a right click, one will be able to create a subclass of a form (ui). In a dialog (see screenshot), I list signals for each widgets. When the user valid the dialog, each items checked are created on a new implementation file with his name, parameter types and names. It is for that that I need the names!

    Thanks,
    Attached Images Attached Images
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

Similar Threads

  1. QTextEdit simple question
    By Marcopolo in forum Qt Tools
    Replies: 4
    Last Post: 11th October 2007, 00:01
  2. Beginner C++ question
    By masoroso in forum General Programming
    Replies: 2
    Last Post: 19th April 2006, 14:15
  3. Replies: 6
    Last Post: 19th March 2006, 18:41
  4. Basic question on new and delete
    By jcr in forum General Programming
    Replies: 25
    Last Post: 14th February 2006, 15:09
  5. QTextEdit Qt4: simple question
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2006, 12:03

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.