Results 1 to 4 of 4

Thread: Explaining the Tooltips lingo

  1. #1
    Join Date
    Sep 2013
    Posts
    32
    Qt products
    Qt5
    Platforms
    Unix/X11
    Thanks
    9

    Question Explaining the Tooltips lingo

    Only about half the time are tooltips all that helpful to me, only because I don't understand exactly what context they are using the terms in. For example, when typing, "button->setIcon..." a tooltip pops up and shows, "QIcon(const Qstring &fileName) "

    I get that they want me to use a string, and list a fileName, but I don't know what the const function has to do with all this. Is it saying that I can't put a variable in there? Or that whatever I put in there will be turned into a constant? Or is it saying I have to put a const before the qstring? What about the &? Does this mean I need a namespace for the filename?

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: Explaining the Tooltips lingo

    All the questions you have are related to C++ basics, please take time to read more about these concepts

    const-correctness
    Reference (C++)
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Sep 2013
    Posts
    32
    Qt products
    Qt5
    Platforms
    Unix/X11
    Thanks
    9

    Default Re: Explaining the Tooltips lingo

    Quote Originally Posted by Santosh Reddy View Post
    All the questions you have are related to C++ basics, please take time to read more about these concepts

    const-correctness
    Reference (C++)
    Huh... These types of answers are a) indirect, b) useless.

    "Hey I have a specific question about how this term. Ive learned about it, and what it does normally in C++ but I just want to figure out what its doing in a tool-tip."

    "RTFM; your question has nothing to do with QT because it references the language QT is built upon. What do you think this is? A newbie area to ask newbie questions? Here is an encyclopedia; read that; you'll just have to assume that you will be able to guess the answer to your question by the time you are done reading that, despite the fact that QT or Tooltips is not brought up in either of the articles. Your welcome!"
    Last edited by Akiva; 1st September 2013 at 21:18.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Explaining the Tooltips lingo

    The tooltip that your unspecified IDE is presenting is a context-sensitive aid to what should come next. Sometimes it will be the completion of a partly typed name of a C++ class, object, function or variable, and sometimes it will the prototype for a parameter to a function ( or a list of them). The interpretation of a parameter prototype is entirely to do with C++ and not specific to Qt.

    In your example the tooltip is the telling you the prototype for constructing a QIcon object. One of the constructors (there is often more than one option) accepts a constant reference to a QString. The concepts of const and reference are both generic C++. The meaning of the QString to the QIcon constructor is specific to Qt and can be found in Assistant.

  5. The following user says thank you to ChrisW67 for this useful post:

    Akiva (1st September 2013)

Similar Threads

  1. how i use the tooltips
    By robelle in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2012, 15:51
  2. detailed explaining qwt example
    By AD in forum Qwt
    Replies: 6
    Last Post: 9th July 2008, 21:13
  3. help explaining qmake generated make file
    By high_flyer in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2006, 09:54
  4. Tooltips for QListViewItems (QT3)?
    By gadnio in forum Newbie
    Replies: 3
    Last Post: 13th March 2006, 17:02
  5. toolTips?
    By mickey in forum Qt Programming
    Replies: 11
    Last Post: 23rd February 2006, 19:10

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.