Results 1 to 6 of 6

Thread: Qstring value does not appear in locals and watchers

  1. #1
    Join Date
    Aug 2010
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows
    Thanked 1 Time in 1 Post

    Default Qstring value does not appear in locals and watchers

    Hi,

    I have installed qt creator 1.3.1 on my windows xp machine.
    I have created a project and want to debug some portion of code and want to check the value of local variables at run time.
    As Qt creator provides facility like locals and watcher in debug mode, still it does not show me value of any QString variable or any list containing QString variables.
    Values for all other data types are shown perfectly.
    Will any one help me to figure out is there any setting to make it visible?

    Thanks in advance,
    Sanket

  2. The following user says thank you to sanket.mehta for this useful post:


  3. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qstring value does not appear in locals and watchers

    So you mean you can see contents of say... QRect variables but not QString variables?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #3
    Join Date
    Aug 2010
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows
    Thanked 1 Time in 1 Post

    Default Re: Qstring value does not appear in locals and watchers

    Hey,

    I don't know about QRect variable values.
    I was just talking about primary data types like int, float, boolean etc..
    Among these I can not see values of QString variables.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qstring value does not appear in locals and watchers

    So you probably can't see any Qt classes which means you don't have a "debugging helper" built. Open Creator's settings, find the dialog that says something about a debugging helper and rebuild the helper.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Aug 2010
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows
    Thanked 1 Time in 1 Post

    Default Re: Qstring value does not appear in locals and watchers

    Hi,

    Thanks for reply.
    I tried the same with rebuild helper.
    But still I cannot see the value of string types.
    Can you suggest me some other options?

  7. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Qstring value does not appear in locals and watchers

    either its what wysota said, or, you think QString is the same as char* - which is not.
    Can you see the content of other NON natural types (classes)?
    I hope you are aware you have to collapse the object tree in the debugger, and then look at the pointer pointing to the data itself.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. With QString create a QString&
    By avis_phoenix in forum Newbie
    Replies: 1
    Last Post: 21st April 2010, 23:05
  2. Replies: 4
    Last Post: 1st February 2010, 15:21
  3. No locals & watches with CDB
    By razvan.petru in forum Qt Tools
    Replies: 0
    Last Post: 6th October 2009, 12:09
  4. Replies: 4
    Last Post: 31st January 2008, 21:44
  5. how to copy part of QString to anothe QString
    By nass in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2007, 20:05

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.