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?

Extensions around subclassing of QStandardItem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qstandarditemsubclassingqueriesdatabasessoftware design
8 Posts 5 Posters 1.9k 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 18 Oct 2018, 19:30 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?

    R 1 Reply Last reply 19 Oct 2018, 09:54
    0
    • E elfring
      18 Oct 2018, 19:30

      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?

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 19 Oct 2018, 09:54 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

      J E 3 Replies Last reply 19 Oct 2018, 09:56
      3
      • R raven-worx
        19 Oct 2018, 09:54

        @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.

        J Offline
        J Offline
        JonB
        wrote on 19 Oct 2018, 09:56 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! :)

        J 1 Reply Last reply 19 Oct 2018, 10:41
        1
        • J JonB
          19 Oct 2018, 09:56

          @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! :)

          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 19 Oct 2018, 10:41 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
          • R raven-worx
            19 Oct 2018, 09:54

            @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 19 Oct 2018, 12:25 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.

            V 1 Reply Last reply 19 Oct 2018, 14:22
            0
            • E elfring
              19 Oct 2018, 12:25

              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.

              V Offline
              V Offline
              VRonin
              wrote on 19 Oct 2018, 14:22 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 19 Oct 2018, 17:53
              2
              • V VRonin
                19 Oct 2018, 14:22

                @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 19 Oct 2018, 17:53 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
                • R raven-worx
                  19 Oct 2018, 09:54

                  @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 1 Nov 2018, 07:48 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