views:

31

answers:

2

Hello, I have a form and several widgets on it. Say, I have the following code and breakpoint on this line:

ui->labTitle->setMinimumHeight(64);

And I would like to know which height the labTitle has now. Where and how??? If I try to add ui->labTitle into watches list it says it doesn't know what is it. Maybe I need to adjust some debug settings but I don't know what exactly. Thanks

A: 

ui->labTitle is actually this->ui->labTitle, so it's only valid when being in a context where this pointer is valid and points to the your main window. Adding to the watches should work, but don't forget the parantheses:

this->ui->labTitle->minimumHeight()
Tamás Szelei
Didn't help, I don't know why, it still <invalid> and <unknown>, even after CONFIG += debug added.
Seacat
A: 

One thing you can check is to make sure your .pro file contains a config setting that specifies "debug" like this:

CONFIG += debug 
Arnold Spence
Didn't help for some reason...
Seacat