PDA

View Full Version : How to watch the value of QString in Qt Creator 2.3.85 on Mac OSX 19.8.1 ?



vsthakur1
30th October 2012, 21:02
I am using QtCreator 2.3.85 on Mac OSX 10.8.1 .
While debugging C++ code, I could figure out the value of QString in watch window. I t shows a bunch of things, like array , alloc , data - but I could not figure out how to see the exact content.
Having worked on different debugging environments, it is my expectations that I should see the content without any struggle. I am sure , Qt Creator must also have the way. However, i am not able to figure out how to do it.I searched in web, but could not find out any definite answer to that. I may be missing some setting or something.

ChrisW67
30th October 2012, 22:26
It's your debugger that shows the content of variables. To do that for arbitrary object it need helper code to provide a human-friendly display value. These need to be built to match each version of Qt.

You may need to build the debugging helpers to match your version of Qt. See Tools > Options... > Qt4 > Qt Versions
http://doc.qt.digia.com/qtcreator-2.3/creator-debugging-helpers.html#debugging-helpers-based-on-c

dhjdhj
8th December 2012, 11:31
For what it's worth, I'm using the latest official Qt (built from source) on my Mac and I am still unable to get the debugger to show me the contents of QString values, etc.

I've built the debugging helpers, etc, etc....no errors, but I'm still unable to get this to work. In fact I have never had a version of Qt on my Mac where debugging system showed me nicely formatted variable values. I've always had to report to qDebug() << .... etc