Examining the memory with Qt Creator

For this section, we will use the following code snippet:

bool boolean = true; 
int integer = 5; 
char character = 'A'; 
int* integerPointer = &integer; 
 
qDebug() << "boolean is:" << boolean; 
qDebug() << "integer is:" << integer; 
qDebug() << "character is:" << character; 
qDebug() << "integerPointer is:" << integerPointer; 
qDebug() << "*integerPointer is:" << *integerPointer; 
qDebug() << "done!"; 

We declared three primitive types: booleaninteger, and character. We also added a  integerPointer pointer that refers to the integer variable. Put a breakpoint at the last line and start the debugging. On the Debug pane, you should have the Locals and Expressions view. You can easily add/remove it from WindowViews

Get Mastering Qt 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.