Results 1 to 2 of 2

Thread: SQL / MVC : Advice on best choice between pure SQL against QTableModel

  1. #1
    Join Date
    Nov 2007
    Posts
    53
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default SQL / MVC : Advice on best choice between pure SQL against QTableModel

    Hi everybody,

    I have actually a QStandardItemModel where I set sometimes items with a QFontRole or QDecorationRole to display an image or another (so it could be a bool in database for example).

    I have not experienced so much with the 2 approachs but like the QTableModel approach. But I wonder if I will be easily able to add a QFontRole to all the columns of a row depending on the bool value.

    For the ability to display an image or another on the bool column, I suppose this is do-able as I've seen the books example with the "stars rating" custom delegate.

    So, I almost wonder if I could do something with QFontRole on a QTableModel or if it should be better to deal with the other approach with pure SQL then dealing with the model myself.

    Thanks for your advice.

  2. #2
    Join Date
    Nov 2007
    Posts
    53
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: SQL / MVC : Advice on best choice between pure SQL against QTableModel

    Ok, my question is perhaps totally stupid but I am quite tired and my attention is not really focussed today ;o)

    Why the hell dealing with higher level stuffs like QSqlTableModel when we know all about SQL requests ;o)

    But perhaps I'm wrong and if I what I would like to achieve with specific role is possible at a higher-level, it could be nice to stay on a C++ / Qt / model friendly syntax...

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.