Results 1 to 6 of 6

Thread: How to make Creator be aware of the Qt source code project?

  1. #1

    Default How to make Creator be aware of the Qt source code project?

    Hi, guys, I downloaded the whole Qt 4.6 source codes via git and opened it in Qt creator.
    Now my question is:
    I want Qt creator can navigate the functions/classes to the source codes. E.g: Currently if I try to navigate to the declaration of QListWidget, Qt creator navigates to the header file in Qt's SDK and it can't find out the source codes of QListWidget because Qt SDK doesn't ship with source codes.
    So I want creator turns to the source codes of Qt which I have already opened in creator. In this way, I can read the source codes of Qt directly while coding, you know, this is more efficient than reading documents.

    Thanks in advance.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to make Creator be aware of the Qt source code project?

    Qt SDK comes with the source code, for example QListWidget source can be found in: "C:\Qt\2010.05\qt\src\gui\itemviews" //i'm on windows now, with Qt 4.7

    And i don't really understand your question, you want the help to display the source code and not the documentation?
    I don't think that, in the majority of the cases, you need to see the source code to understand how to use a feature/function/class/module of Qt, it might help in some cases, but the documentation is better most of the times.

  3. #3
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to make Creator be aware of the Qt source code project?

    If you have the Qt sources downloaded you can open src.pro and Creator.

  4. #4

    Default Re: How to make Creator be aware of the Qt source code project?

    Quote Originally Posted by Zlatomir View Post
    Qt SDK comes with the source code, for example QListWidget source can be found in: "C:\Qt\2010.05\qt\src\gui\itemviews" //i'm on windows now, with Qt 4.7

    And i don't really understand your question, you want the help to display the source code and not the documentation?
    I don't think that, in the majority of the cases, you need to see the source code to understand how to use a feature/function/class/module of Qt, it might help in some cases, but the documentation is better most of the times.
    Thank you, Zlatomir. Yes, qt SDK ships with the source codes, great. This is not necessary to download the Qt source codes manually. If so, my question is, how to read the Qt source codes in creator?
    E.g: I wanna check the source codes of QListWidget, my steps are:
    1. Place the cursor on the "QListWidget" in my source codes, then select "Follow symbol under cursor", the Creator jumps to the declaration of QListWidget which is inside "qlistwidget.h".
    2. Choose menu "Tools" -> "C++" -> "Switch Header/Source" -- nothing happened.
    3. Navigate to one function defined in QListWidget, e.g: "currentItem()", select context menu "Switch between method declaration/Definition" -- nothing happened.

    So, I just wanna check the source codes of QListWidget, not just only header files. If qt SDK ships with source codes of Qt, why creator can't navigate to the source codes for me? Is this a bug of Creator or, something is wrong in my creator configuration?

    Thanks again.

  5. #5

    Default Re: How to make Creator be aware of the Qt source code project?

    Quote Originally Posted by ktk View Post
    If you have the Qt sources downloaded you can open src.pro and Creator.
    Thank you, I already opened the project in creator.

  6. #6
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to make Creator be aware of the Qt source code project?

    As far as i know, you can't navigate directly from your project in Creator.

    In cases you really need to see the source, you can navigate to that src folder and search the files that you need to see.

Similar Threads

  1. QT Project source code
    By darpan in forum Qt Programming
    Replies: 3
    Last Post: 27th December 2012, 17:16
  2. Where is the source code?
    By Fletcher in forum Newbie
    Replies: 1
    Last Post: 10th December 2009, 21:45
  3. Have Creator open source files with project
    By Asperamanca in forum Qt Tools
    Replies: 2
    Last Post: 23rd October 2009, 09:25
  4. source code
    By Colx007 in forum Newbie
    Replies: 5
    Last Post: 19th December 2007, 10:15
  5. Qte source code
    By Gaurav vyas in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st July 2007, 15:11

Tags for this Thread

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.