Results 1 to 16 of 16

Thread: Storage and View -> imageViewer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    40
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Storage and View -> imageViewer

    Quote Originally Posted by jacek View Post
    If you pass a string to QSqlQuery constructor, it will execute it immediately. It should be:
    Qt Code:
    1. QSqlQuery query;
    2. query.prepare("UPDATE pictures SET data=? WHERE rowid=1;");
    3. query.addBindValue(fileData);
    4. query.exec();
    To copy to clipboard, switch view to plain text mode 

    And the select should be:
    Qt Code:
    1. QSqlQuery query( "SELECT data FROM pictures WHERE rowid=1;" );
    2. query.next(); // <- positions the query on the first row
    3. QSqlRecord record = query.record();
    To copy to clipboard, switch view to plain text mode 
    Okay, thank you
    Quote Originally Posted by Thomas View Post
    One last issue.
    Make sure you delete stuff which you created with new.
    I thought Qt is handling such things for all the classes that inherit QObject, at least their own stuff? Okay, thx I'll add everything to my destructors

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

    Default Re: Storage and View -> imageViewer

    Quote Originally Posted by C167 View Post
    I thought Qt is handling such things for all the classes that inherit QObject, at least their own stuff?
    Yes, it does, but only for objects that have a parent.

  3. #3
    Join Date
    Jan 2008
    Posts
    40
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Storage and View -> imageViewer

    okay, thx

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.