Very simple example with classes hierarchy:
Qt Code:
  1. class Object {
  2. public:
  3. Object(int id_) : id(id_) {}
  4. virtual ~Object() {}
  5.  
  6. private:
  7. int id;
  8. };
  9.  
  10. class Point: public Object {
  11. public:
  12. Point(double x_, double y_, int id_)
  13. : Object(id_), x(x_), y(y_) {}
  14.  
  15. private:
  16. double x, y;
  17. };
  18.  
  19. class Circle: public Point {
  20. public:
  21. Circle(double x_, double y_, double r_, int id_)
  22. : Point(x_, y_, id_), r(r_) {}
  23.  
  24. private:
  25. double r;
  26. };
  27.  
  28. int test(Object *obj)
  29. {
  30. return 0; // <== break point here
  31. }
  32.  
  33. int main()
  34. {
  35. test(new Circle(1.5, -2.5, 3.0, 15));
  36. return 0;
  37. }
To copy to clipboard, switch view to plain text mode 

When I set breakpoint in QtCreator and try to watch "obj" in debugger it doesn't show the actual (runtime instead of static) type and corresponding data. This is how it looks like:


And I would like to see something like in MSVC debugger:


How can I configure QtCreator to show the actual runtime data?