views:

175

answers:

2

When I'm debugging my program, the values displayed for floating point numbers are totally wrong.

double a = 1.0;
QList<double> list;
list << a;

With this example the debbugger shows that a contains 1.0 that list contains one item, but its displayed value is rubbish (seems that is not read at the right place) -- its real value is correct anyhow if I display it in my program UI.

Qt Visual intergation fails on QLists

Anyone had this problem and knows how to solve it?

A: 

Works as expected for me, using Qt Creator.
Have you tried running the same code with another debugger?

Niklas Berglund
No, but I'd like it to work in VS given it' the IDE I have to use for this project.
gregseth
I see, I was just thinking that'd be a way of knowing for sure there's nothing wrong with your code. But well, its a simple code snippet, not much room for mistakes there
Niklas Berglund
+1  A: 

Have you added the knowledge of Qt's types to Visual Studio? If not, see the information about it on Qt's mailing list and on this blog entry about integrating Qt and Visual Studio.

Caleb Huitt - cjhuitt
The second link seems to be the one. I'll try that at work tomorrow. Thanks.
gregseth
No, it doesn't work better.
gregseth
The new version (updated for Qt 4.6.1) works, even for 4.5.1. Thanks for the link!
gregseth