Question

enter image description here

When I double clicked on QString object in totalview debugger this window appears. How can I get the exact value of it.

I have tried command.toUtf8().constData() but it prints Cannot find name "toUtf8".

Was it helpful?

Solution

::TV::TTF::RTF::build_struct_transform { 
    name {^struct QString$} 
    members { 
       { ascii { $wstring_u16 cast { * { d -> unicode } } } } 
    } 
} 

::TV::TTF::RTF::build_struct_transform { 
    name {^struct QString$} 
    members { 
       { ascii { $wstring_u16 cast {* {d -> data} } } } 
    } 
}

Add this to $HOME/.tvdrc flie. First is for Qt3 and second for Qt4.

OTHER TIPS

For QT5 please add the following to the file $HOME/.tvdrc

::TV::TTF::RTF::build_struct_transform { 
    name {^class QString$}
    members { 
       { string { $wstring_s16 cast {{ * { d }} + 1  } } }     
    } 
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top