Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. C++ Reference in QtCreator help
Forum Updated to NodeBB v4.3 + New Features

C++ Reference in QtCreator help

Scheduled Pinned Locked Moved Qt Creator and other tools
17 Posts 9 Posters 27.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pavko
    wrote on 13 Jul 2010, 09:23 last edited by
    #1

    Hello all,

    I just started to learn C++ wiht QT and found that context help in QtCreator is very helpfull

    I downloaded C++ Reference from "C++ Reference wiki":http://www.cppreference.com/wiki/_media/about/cppreferencecom_feb09.zip

    I converted unpacked content from chm to qch file with content and index.

    It works fine, but context help in source editor doesn't work.

    Can anybody help me to understand how to make context help working with my compiled qch?

    I can upload if you need C++ reference in qch format and qt project qhp files.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vsorokin
      wrote on 14 Jul 2010, 13:04 last edited by
      #2

      Good question, I join to it.

      pavko, Please, give me qch-file with C++ reference, I need it.
      Thanks.

      --
      Vasiliy

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pavko
        wrote on 14 Jul 2010, 14:53 last edited by
        #3

        "my cppref.qch":https://docs.google.com/leaf?id=0B6w3G_xx1dDnMjYyMjQ1ODctNGZmMy00MzRhLWJlOGEtMDdhOTc0N2EzOTgx&sort=name&layout=list&num=50

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lyuts
          wrote on 14 Jul 2010, 15:21 last edited by
          #4

          I just added your qch file to Qt Creator's help via Tools->Options->Help->Documentatioin tab, pressed F1, and got cpp reference. Try to check Filters tab, there should be corresponding items checked for cpp reference.

          I'm a rebel in the S.D.G.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pavko
            wrote on 14 Jul 2010, 15:28 last edited by
            #5

            I mean, that it doesn't work in text editor. For example, when you point on keyword (something like "void") pressing F1 - I want, that on the right side help about "void" apears. It doesn't works.

            So, I can't find solution to make CONTEXT help possible. I don't know how to turn it on with my compiled file.

            Anyway - thanks for help :)

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lyuts
              wrote on 14 Jul 2010, 16:00 last edited by
              #6

              Sorry, I just misunderstood the original issue.

              I'm a rebel in the S.D.G.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                baysmith
                wrote on 15 Jul 2010, 00:10 last edited by
                #7

                Do you have a C++ project open? It appears to me that Qt Creator may not scan the source files for symbols unless a C++ project is open.

                Have you restarted Qt Creator? I have also found that sometimes Qt Creator needs to be restarted after the qch is registered with it.

                Nokia Certified Qt Specialist.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  pavko
                  wrote on 15 Jul 2010, 05:36 last edited by
                  #8

                  Yes, I did this. Actualy I mean context help, like in "this post":http://qtcreator.blogspot.com/2009/07/context-sensitive-help.html

                  Content and index are working fine.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    baysmith
                    wrote on 15 Jul 2010, 06:37 last edited by
                    #9

                    The hover-and-hit-F1 context help works for me with the Qt Creator snapshot from Jun 7 (from revision b4bf0289b1, for Windows). If I hover-F1 over #include <algorithm>, it pulls up the algorithms page. If I hover-F1 over #include <vector>, it pulls up the vector page. If I hover over #include <numeric>, it does not work (probably because there is no numeric keyword in the index). The context help has been somewhat problematic, but it has been getting more reliable over time. I find recent development builds work more often than not.

                    Nokia Certified Qt Specialist.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tobias.hunger
                      wrote on 15 Jul 2010, 17:29 last edited by
                      #10

                      bradley: We try not to break creator, but sometimes something does slip through... having said that: Most of the people working on qt creator do so using creator from the branch they work on, so we do tend to notice most breakages:-)

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        floridaboy
                        wrote on 14 Nov 2010, 03:50 last edited by
                        #11

                        I tried with Qt Creator 2.0.1 and yes, the context help does not work. I did not debug the Qt Creator, but STL reference (available here: http://developer.qt.nokia.com/wiki/Qt_Creator_Documentation_Gallery) does work in the context mode. This makes me wonder if the context tags were generated correctly when the cppref.qch file was created?

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          KiaPlayer
                          wrote on 3 Jan 2011, 20:35 last edited by
                          #12

                          I tried "cppref.qch" with Qt Creator 2.0.1. Context help works fine for functions (e.g. abs, ceil, atoi), but doesn't works for keywords (e.g. void, switch, public). But it's good enough :)

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            dirx
                            wrote on 29 Aug 2011, 13:59 last edited by
                            #13

                            The context help (F1) seems only to work, if the correct #include statement is in the code. I tried "cppref.qch" and also the Linux Man Pages (available here http://developer.qt.nokia.com/wiki/Qt_Creator_Documentation_Gallery) with Qt Creator 2.2.1 and also the latest nightly build of 2.3.
                            Here an example code to test the context help:

                            @#include <QtCore/QCoreApplication>
                            #include <cmath>
                            #include <cstdio>
                            #include <cstdlib>

                            int main(int argc, char *argv[])
                            {
                            QCoreApplication a(argc, argv);
                            abs(10.0);
                            char name[] = "world";
                            FILE *out = fopen( "output.txt", "w" );
                            if( out != NULL )
                            fprintf( out, "Hello %s\n", name );
                            sqrt(12.2);
                            rand();
                            return a.exec();
                            }
                            @

                            For example, for the math functions abs() and sqrt() the context help works only if <cmath> is included and recognized by QtCreator (cmath.h must be in the PATH or in INCLUDEPATH of the *.pro project file). The same behavior for rand() and <cstdlib>. But for printf, fprintf or fopen the context help does not work at all, even with <cstdio>. Also no context help for the keywords.

                            Normally, a context help system should be independent of the syntax parser, i.e. the include files, as it happens often that one would like to know the correct include file for a specific function.

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              dirx
                              wrote on 29 Aug 2011, 14:23 last edited by
                              #14

                              Same problem for QCoreApplication and its #include statement, as soon as the #include <QtCore/QCoreApplication> statement is commented (//) or removed, "QCoreApplication" change its color and no more context help via F1.
                              So the problem seems to be general for all qch-help files and not only the C++-reference or Linux Man Pages help files. It is a problem of Qt Creator and not the help files or their context tags.
                              I have put a bug-report here:
                              https://bugreports.qt.nokia.com/browse/QTCREATORBUG-5948

                              1 Reply Last reply
                              0
                              • P Offline
                                P Offline
                                pavko
                                wrote on 12 Mar 2012, 16:59 last edited by
                                #15

                                To finalize this thread - you can find cpp reference in qch format here "CPP-reference":http://en.cppreference.com/w/Cppreference:Archives

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  tobias.hunger
                                  wrote on 5 Apr 2012, 15:02 last edited by
                                  #16

                                  I took the liberty of adding that link to the "Qt Creator documentation gallery":https://qt-project.org/wiki/Qt_Creator_Documentation_Gallery (below the other link to and C++ reference in QCH format;-)

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    mloskot
                                    wrote on 11 Oct 2013, 21:25 last edited by
                                    #17

                                    Qt Creator 2.8.1 here with "Linux Man Pages Qt Help integrated":http://shinnok.com/rants/2011/07/19/linux-man-pages-integration-with-qt-creator/

                                    It runs out something is still not right with recognising the right headers.

                                    In this example, F1 for the fabs function works:
                                    @
                                    #include <math.h>
                                    int main()
                                    {
                                    fabs(-1);
                                    }
                                    @

                                    but in this, F1 for the printf does not work:
                                    @
                                    #include <stdio.h>
                                    int main()
                                    {
                                    printf("");
                                    }
                                    @

                                    1 Reply Last reply
                                    0

                                    • Login

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups
                                    • Search
                                    • Get Qt Extensions
                                    • Unsolved