Crashing without debug mode- No crashing with gdb debugger
Dear All
I am facing some problem in implementing a QScrollArea. I subclassed it and created a buttin on this as below.
CScrollArea::CScrollArea() {
printbutton = new QPushButton("Save As Image",this);
printbutton->setGeometry(actual_page_width + coordx-100,coordy,100,25);
connect(printbutton,SIGNAL(clicked()),this,SLOT(go toprinter()));
}
the problem is that when I am trying show this scrollarea through menu click its crashing. and crashing at the first line
printbutton = new QPushButton("Save As Image",this);
but when I am debugging this through gdb debugger then its running fine and at the end i can see the scroll are with button.
Why is happening like this. Any idea from anyone would be highly appreciate.
Also when I try to set a window title like
setWindowTitle("My Page");
its again crashing.
Thanks in advance for any help. sujan
Re: Crashing without debug mode- No crashing with gdb debugger
Give us a compiling example reproducing the problem. It may clarify things.
Also, did you try a full rebuild?
Added after 4 minutes:
You may also have to check if this actually exists. When attaching a debugger values are initialized differently.