Results 1 to 3 of 3

Thread: Passing additional parameters to QtSqlResult plugin

  1. #1
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Passing additional parameters to QtSqlResult plugin

    Hi,

    Suppose that One wants to pass additional parameters to a plugin implementation of QtSqlResult in a similar manner as the setForwardOnly parameter but for different info

    Is there some generic method for adding parameters, or the base QtSqlResult class needs to be modified?

    Also, that class appears to have
    Qt Code:
    1. enum VirtualHookOperation { };
    2. virtual void virtual_hook(int id, void *data);
    To copy to clipboard, switch view to plain text mode 

    What is this hook used for?

    Thanks
    lk

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Passing additional parameters to QtSqlResult plugin

    I assume you mean QSqlResult, there is no QtSqlResult.

    What is this hook used for?
    Qt4: Implements various 'virtual' functions in a way that maintains binary compatibly for Qt4.
    Qt5: Nothing. Qt 5.x onward removes the existing uses of this hook and replaces them with real virtual functions.
    See http://qt.gitorious.org/qt/qtbase/co...21e9db20a91b85

    If you want you concrete subclass to have extra functions to configure it then by all means add them and set their values in your plugin before returning your QSqlResult*: they will not be visible through the QSqlResult interface. If the extra properties must be manipulated through the QSqlResult interface then you need to use the virtual_hook() function: see the Qt 4.8 code for example.

  3. #3
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Passing additional parameters to QtSqlResult plugin

    Yes I meant QSqlResult

    Seems like the hook should be used for additional properties manipulation while maintaining binary compatability

Similar Threads

  1. Passing of Parameters in two classes
    By StarRocks in forum Qt Programming
    Replies: 4
    Last Post: 17th October 2012, 05:48
  2. Replies: 1
    Last Post: 22nd April 2010, 14:34
  3. Replies: 2
    Last Post: 22nd April 2010, 11:44
  4. passing parameters to Active-x in hash does not work
    By yazwas in forum Qt Programming
    Replies: 0
    Last Post: 26th February 2010, 11:53
  5. Replies: 2
    Last Post: 27th March 2007, 12:09

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.