不确定这是一个错误,还是意图。谷歌搜索这个除了标题为QT-Creator Troubleshoot之外没有提供任何信息:
指针变量成员不会直接显示
简单地参考:启用指针解除指示。
我已启用此功能,请参阅调试会话的屏幕截图
问题:
就像创建一个新对象一样,例如:
QString newString = QString("This is a new string");
显示在调试器中,newString
的内容显示在调试器中。
然而将其更改为指针,例如
QString *newString = new QString("This is a new string");
正如屏幕截图中所有已定义的指针一样,这些指针和newString
指针将无法解析所持有的内容。
这是一个错误还是QT无法解决此问题?
请参阅下面的调试器信息的深入视图:
调试器信息截图
调试器信息数据
Locals
appdata @0x7fffffffe000 QString
d @0x5555557ea610 QString::Data
[QArrayData] @0x5555557ea610 QArrayData
alloc 20 uint
capacityReserved 0 uint
offset 24 qptrdiff
ref @0x5555557ea610 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
size 21845 int
null @0x7ffff6a8d6a0 QString::Null
dir @0x7fffffffe060 QDir
d_ptr @0x7fffffffe060 QSharedDataPointer<QDirPrivate>
d @0x5555557ede00 QDirPrivate
projDir @0x7fffffffe010 QString
d @0x5555557eabf0 QString::Data
[QArrayData] @0x5555557eabf0 QArrayData
alloc 11 uint
capacityReserved 0 uint
offset 24 qptrdiff
ref @0x5555557eabf0 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
size 21845 int
null @0x7ffff6a8d6a0 QString::Null
this @0x5555557e8c80 dataManager
configFile 0x0 QFile *
configPath 0x0 QString *
networkManager @0x5555557e8c80 netman
paths_list @0x5555557e8d00 QStringList
userFile @0x5555557eea70 QFile
userName @0x5555557e8cf8 QString
d @0x5555557efb30 QString::Data
[QArrayData] @0x5555557efb30 QArrayData
alloc 3 uint
capacityReserved 0 uint
offset 24 qptrdiff
ref @0x5555557efb30 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
[0] @0x7ffff6a16ee0 QArrayData
[1] @0x7ffff6a16ef8 QArrayData
size 2 int
null @0x7ffff6a8d6a0 QString::Null
userPath @0x5555557ec8f0 QString
d @0x5555557ed6b0 QString::Data
null @0x7ffff6a8d6a0 QString::Null
userConfName @0x7fffffffdff0 QString
d @0x5555557df5e0 QString::Data
[QArrayData] @0x5555557df5e0 QArrayData
alloc 14 uint
capacityReserved 0 uint
offset 24 qptrdiff
ref @0x5555557df5e0 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
[0] @0x7ffff6a16ee0 QArrayData
alloc 0 uint
capacityReserved 0 uint
offset 24 qptrdiff
ref @0x7ffff6a16ee0 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
[0] @0x7ffff6a16ee0 QArrayData
alloc 0 uint
capacityReserved 0 uint
offset 24 qptrdiff
ref @0x7ffff6a16ee0 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
size 0 int
[1] @0x7ffff6a16ef8 QArrayData
alloc 0 uint
capacityReserved 0 uint
offset 0 qptrdiff
ref @0x7ffff6a16ef8 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
size 0 int
size 0 int
[1] @0x7ffff6a16ef8 QArrayData
alloc 0 uint
capacityReserved 0 uint
offset 0 qptrdiff
ref @0x7ffff6a16ef8 QtPrivate::RefCount
shared_null @0x7ffff6a16ee0 QArrayData [2]
size 0 int
size 21845 int
null @0x7ffff6a8d6a0 QString::Null
Inspector
Expressions
Return Value
Tooltip