PDA

View Full Version : Object Not destroy



Sudhanshu Sharma
30th July 2008, 09:46
class HtmlNavigator : public QDialog,public Ui::HtmlNavigator
{
Q_OBJECT
public:
HtmlNavigator(QString,QString,QWidget *parent);
~HtmlNavigator();
private slots:
void slotCloseBrowser();
};

salmanmanekia
30th July 2008, 10:55
can you please elobrate it more..

Sudhanshu Sharma
30th July 2008, 11:13
class HtmlNavigator : public QDialog,public Ui::HtmlNavigator
{
Q_OBJECT
public:
HtmlNavigator(QString,QString,QWidget *parent)
{
setupUi(this);
connect(PButton_CloseBrowser, SIGNAL(clicked()) , this, SLOT(slotCloseBrowser()));
}

~HtmlNavigator()
{
qDebug()<<"destroy html";
}
......
private slots:
void slotCloseBrowser()
{
destroy();
}
.....

};

X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x0

I have create object of above class in more than 10 different location in our application but object not destroy as distructor is not call on click of close button and above error again and again.

When I exit my application 10 times distructor call ,
Help any one..

jacek
31st July 2008, 00:16
You have to set the Qt::WA_DeleteOnClose widget attribute on that dialog.

The BadDrawable error must be caused by something else. What does destroy() do?