Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Extensions around subclassing of QStandardItem?
Forum Update on Monday, May 27th 2025

Extensions around subclassing of QStandardItem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qstandarditemsubclassingqueriesdatabasessoftware design
8 Posts 5 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elfring
    wrote on last edited by
    #1

    Subclassing is described for the class “QStandardItem” to some degree.
    I have got the impression that this programming interface expects to manage data completely on its own so far. The current storage implementation can be seen in the class “QStandardItemPrivate”.
    I imagine that it would be useful if the involved dependencies and constraints can be determined also by customised queries on databases.
    How do you think about a different mapping between these data processing approaches?

    raven-worxR 1 Reply Last reply
    0
    • E elfring

      Subclassing is described for the class “QStandardItem” to some degree.
      I have got the impression that this programming interface expects to manage data completely on its own so far. The current storage implementation can be seen in the class “QStandardItemPrivate”.
      I imagine that it would be useful if the involved dependencies and constraints can be determined also by customised queries on databases.
      How do you think about a different mapping between these data processing approaches?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @elfring said in Extensions around subclassing of QStandardItem?:

      I imagine that it would be useful if the involved dependencies and constraints can be determined also by customised queries on databases.
      How do you think about a different mapping between these data processing approaches?

      about what exactly are you talking about? o.O

      Am i assuming right that you want to configure how QStandardItem/QStandardItemModel works via a database?!
      If so no chance. Thats way out of the scope of standard item models to quickly setup common item view use cases.

      Nevertheless since QStandardItemModel is based upon QAbstractItemModel you are free to implement a custom model specifically to your needs. Which honestly isn't that complicated in the end.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      JonBJ E 3 Replies Last reply
      3
      • raven-worxR raven-worx

        @elfring said in Extensions around subclassing of QStandardItem?:

        I imagine that it would be useful if the involved dependencies and constraints can be determined also by customised queries on databases.
        How do you think about a different mapping between these data processing approaches?

        about what exactly are you talking about? o.O

        Am i assuming right that you want to configure how QStandardItem/QStandardItemModel works via a database?!
        If so no chance. Thats way out of the scope of standard item models to quickly setup common item view use cases.

        Nevertheless since QStandardItemModel is based upon QAbstractItemModel you are free to implement a custom model specifically to your needs. Which honestly isn't that complicated in the end.

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by JonB
        #3

        @raven-worx
        If you read the OP's posts on this subject & others elsewhere, I think you'll actually discover he wishes to have a discussion on theoretical approaches to coding and how Qt implements them, rather than anything to code/solve specifically! :)

        jsulmJ 1 Reply Last reply
        1
        • JonBJ JonB

          @raven-worx
          If you read the OP's posts on this subject & others elsewhere, I think you'll actually discover he wishes to have a discussion on theoretical approaches to coding and how Qt implements them, rather than anything to code/solve specifically! :)

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JonB In this case it would actually make more sense to discuss with Qt devs as this is user forum :-)

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • raven-worxR raven-worx

            @elfring said in Extensions around subclassing of QStandardItem?:

            I imagine that it would be useful if the involved dependencies and constraints can be determined also by customised queries on databases.
            How do you think about a different mapping between these data processing approaches?

            about what exactly are you talking about? o.O

            Am i assuming right that you want to configure how QStandardItem/QStandardItemModel works via a database?!
            If so no chance. Thats way out of the scope of standard item models to quickly setup common item view use cases.

            Nevertheless since QStandardItemModel is based upon QAbstractItemModel you are free to implement a custom model specifically to your needs. Which honestly isn't that complicated in the end.

            E Offline
            E Offline
            elfring
            wrote on last edited by
            #5

            If so no chance.

            I see a chance in passing a customised “QStandardItemPrivate” object to a protected constructor for achieving more direct database accesses.

            Which honestly isn't that complicated in the end.

            There are specific software development challenges to consider because these data models tend to collaborate with QStandardItem objects in some ways.

            VRoninV 1 Reply Last reply
            0
            • E elfring

              If so no chance.

              I see a chance in passing a customised “QStandardItemPrivate” object to a protected constructor for achieving more direct database accesses.

              Which honestly isn't that complicated in the end.

              There are specific software development challenges to consider because these data models tend to collaborate with QStandardItem objects in some ways.

              VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              @elfring said in Extensions around subclassing of QStandardItem?:

              I see a chance in passing a customised “QStandardItemPrivate” object to a protected constructor

              https://wiki.qt.io/D-Pointer#Inheriting_d-pointers_for_optimization

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              E 1 Reply Last reply
              2
              • VRoninV VRonin

                @elfring said in Extensions around subclassing of QStandardItem?:

                I see a chance in passing a customised “QStandardItemPrivate” object to a protected constructor

                https://wiki.qt.io/D-Pointer#Inheriting_d-pointers_for_optimization

                E Offline
                E Offline
                elfring
                wrote on last edited by
                #7

                https://wiki.qt.io/D-Pointer#Inheriting_d-pointers_for_optimization

                Thanks for this link to useful information.

                But I read the declaration of QStandardItemPrivate class in the way that no virtual functions are provided. So it seems that derivation is not supported for such a class so far.
                Would you become interested to improve the software situation for database accesses here anyhow?

                1 Reply Last reply
                0
                • raven-worxR raven-worx

                  @elfring said in Extensions around subclassing of QStandardItem?:

                  I imagine that it would be useful if the involved dependencies and constraints can be determined also by customised queries on databases.
                  How do you think about a different mapping between these data processing approaches?

                  about what exactly are you talking about? o.O

                  Am i assuming right that you want to configure how QStandardItem/QStandardItemModel works via a database?!
                  If so no chance. Thats way out of the scope of standard item models to quickly setup common item view use cases.

                  Nevertheless since QStandardItemModel is based upon QAbstractItemModel you are free to implement a custom model specifically to your needs. Which honestly isn't that complicated in the end.

                  E Offline
                  E Offline
                  elfring
                  wrote on last edited by
                  #8

                  How do you think about the usage of customised constructor implementations for the class “QStandardItem”?

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved