Results 1 to 4 of 4

Thread: Object Not destroy

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Object Not destroy

    Qt Code:
    1. class HtmlNavigator : public QDialog,public Ui::HtmlNavigator
    2. {
    3. Q_OBJECT
    4. public:
    5. HtmlNavigator(QString,QString,QWidget *parent);
    6. ~HtmlNavigator();
    7. private slots:
    8. void slotCloseBrowser();
    9. };
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 31st July 2008 at 14:05. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2008
    Location
    Finland /Pakistan
    Posts
    216
    Thanks
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Object Not destroy

    can you please elobrate it more..

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Object Not destroy

    Qt Code:
    1. class HtmlNavigator : public QDialog,public Ui::HtmlNavigator
    2. {
    3. Q_OBJECT
    4. public:
    5. HtmlNavigator(QString,QString,QWidget *parent)
    6. {
    7. setupUi(this);
    8. connect(PButton_CloseBrowser, SIGNAL(clicked()) , this, SLOT(slotCloseBrowser()));
    9. }
    10.  
    11. ~HtmlNavigator()
    12. {
    13. qDebug()<<"destroy html";
    14. }
    15. ......
    16. private slots:
    17. void slotCloseBrowser()
    18. {
    19. destroy();
    20. }
    21. .....
    22.  
    23. };
    To copy to clipboard, switch view to plain text mode 
    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..
    Last edited by jpn; 31st July 2008 at 14:06.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Object Not destroy

    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?

Similar Threads

  1. Getting std::string object from QString object ( qt3)
    By joseph in forum Qt Programming
    Replies: 11
    Last Post: 28th March 2013, 20:09
  2. Open a QMainWindow Object in QDialog Object
    By chuengchuenghq in forum Qt Programming
    Replies: 1
    Last Post: 13th June 2008, 06:33
  3. static Object Vs Pointer
    By rajeshs in forum General Programming
    Replies: 4
    Last Post: 11th June 2008, 07:41
  4. Adding qpaint object to a Layout
    By Rooster in forum Newbie
    Replies: 6
    Last Post: 13th February 2008, 13:12
  5. Replies: 8
    Last Post: 27th August 2007, 15:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.