Results 1 to 15 of 15

Thread: QT - SQLite Connection

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2006
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT - SQLite Connection

    your destructor is called automatically when your mainwindow object is destroyed. How and where do you create your mainwindow object and how does your destructor looks like? Please paste your code, so we can help you.

  2. #2
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT - SQLite Connection

    Hi,
    Thankyou for your help.
    I solve the problum by setting this attribute on the constructor of main window.

    setAttribute(Qt::WA_DeleteOnClose);

    After setting this, the destructor is working when I close the main window.

  3. #3
    Join Date
    Nov 2006
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT - SQLite Connection

    and your problem is fixed?

  4. #4
    Join Date
    Oct 2006
    Posts
    42
    Thanks
    1
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT - SQLite Connection

    This is described in the documentation:
    http://doc.trolltech.com/4.3/qsqldat...removeDatabase

  5. #5
    Join Date
    Nov 2006
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT - SQLite Connection

    yeah, but that's not needed in that case. The call of the database close function will do it.

Similar Threads

  1. Threads and database connection
    By probine in forum Qt Programming
    Replies: 9
    Last Post: 7th August 2013, 08:30
  2. Replies: 3
    Last Post: 2nd August 2007, 21:28
  3. How do I keep the client connection open ?
    By probine in forum Newbie
    Replies: 2
    Last Post: 25th March 2006, 19:06
  4. Can I launch a dial-up connection in Windows?
    By gtthang in forum Qt Programming
    Replies: 3
    Last Post: 9th February 2006, 12:32

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
  •  
Qt is a trademark of The Qt Company.