在Qt Creator的Locals and Expressions调试窗口中看不到某些对象的内部 [英] Can't see some objects' internals in Qt Creator's Locals and Expressions debug window
问题描述
我想在Qt Creator中调试时查看对象的成员变量。我可以看到自己对象的所有内部结构,但是看不到 QGraphicsView
的成员。
I'd like to see the member variables of objects whilst debugging in Qt Creator. I can see all of the internals of my own objects, but I can't see the members of a QGraphicsView
, for example.
我也很好奇为什么会为 std :: map
说<不可用的同步数据>
。这是一个小例子:
I'm also curious to know why it says <unavailable synchronous data>
for std::map
. Here's a small example of that:
#include <map>
#include <string>
int main(int argc, char *argv[])
{
std::map<int, std::string> someMap;
someMap.insert(std::make_pair(1, "cats"));
someMap.insert(std::make_pair(2, "dogs"));
someMap.insert(std::make_pair(3, "vlag"));
return 0;
}
我的构建设置如下:
推荐答案
请参阅我对问题的回答 我可以自定义autoexp.dat以在Visual Studio 2010调试器中启用QT QDomNode的可视化吗?。 Qt使用pimpl意识来隐藏其类的私有数据并在主要版本中提供二进制兼容性。
See my answer to the question "Can I customize autoexp.dat to enable visualization of a QT QDomNode in Visual Studio 2010 Debugger?". Qt uses the pimpl ideom to hide the private data of its classes and to provide binary compatibility within a major version.
这篇关于在Qt Creator的Locals and Expressions调试窗口中看不到某些对象的内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!