View array contents in QtCreator

Can I view the contents of an array in Qt Creator while debugging?

It seems that my array is an array, not a pointer. In addition, the arrow becomes available for me to click, as if to expand it, but after that nothing is displayed.

enter image description here

When I tried it on std::vector , Qt Creator was able to display the contents as expected.

PS: I found this old message about viewing the contents of an array, but it is more than 2 years old and no longer seems relevant.

+1
c ++ qt qt-creator
source share
1 answer

If you mean a regular array like

 int array[20] 

you can add a β€œwatch” in this form:

 (int[20])array 

You can add it to your kind of variables.

+1
source share

All Articles