Examining 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!"; 

In the preceding code, we declared three primitive types: boolean, integer, and character. We also added an 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 ...

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.