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. Software development challenges around setHorizontalHeaderLabels()

Software development challenges around setHorizontalHeaderLabels()

Scheduled Pinned Locked Moved Unsolved General and Desktop
qsqltablemodelqstandarditemmolabelsdatabasessoftware design
9 Posts 3 Posters 1.7k 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 21 Oct 2018, 19:12 last edited by
    #1

    I extended my software development experiences also around the class “QSqlTableModel”. I hoped that database queries will help in some application areas (besides the ones which I know already).
    But I have noticed then again that a program which I would like to adjust further contains a dependency on the function “QStandardItemModel::setHorizontalHeaderLabels”. Now I am curious if you would like to share advices for corresponding software design options.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 21 Oct 2018, 19:32 last edited by
      #2

      Hi,

      These two types of models share a common ancestor, that's all. You're not really explaining what you are currently doing with that application's QStandardItemModel which could be related to QSqlTableModel. So what kind of advice are you looking for ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply 21 Oct 2018, 20:33
      2
      • S SGaist
        21 Oct 2018, 19:32

        Hi,

        These two types of models share a common ancestor, that's all. You're not really explaining what you are currently doing with that application's QStandardItemModel which could be related to QSqlTableModel. So what kind of advice are you looking for ?

        E Offline
        E Offline
        elfring
        wrote on 21 Oct 2018, 20:33 last edited by
        #3

        These two types of models share a common ancestor, that's all.

        It is usual that these classes were derived from a known base.

        So what kind of advice are you looking for ?

        It took another while to recognise where they are different in significant ways.

        I hope that a software transformation will become possible for better cooperation between mentioned programming interfaces.
        Can there be a mapping between these development approaches?

        S 1 Reply Last reply 21 Oct 2018, 20:44
        0
        • E elfring
          21 Oct 2018, 20:33

          These two types of models share a common ancestor, that's all.

          It is usual that these classes were derived from a known base.

          So what kind of advice are you looking for ?

          It took another while to recognise where they are different in significant ways.

          I hope that a software transformation will become possible for better cooperation between mentioned programming interfaces.
          Can there be a mapping between these development approaches?

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 21 Oct 2018, 20:44 last edited by
          #4

          @elfring said in Software development challenges around setHorizontalHeaderLabels():

          These two types of models share a common ancestor, that's all.

          It is usual that these classes were derived from a known base.

          What I was stating is that QSqlTableModel was not inheriting from QStandardItemModel but both had a common base.

          @elfring said in Software development challenges around setHorizontalHeaderLabels():

          It took another while to recognise where they are different in significant ways.
          I hope that a software transformation will become possible for better cooperation between mentioned programming interfaces.
          Can there be a mapping between these development approaches?

          Why would there be ? If you want custom header data with the SQL models, you can either use a proxy model like QIdentityProxyModel, use a QSqlQueryModel with a properly crafted query or subclass QSqlTableModel to return the headers you want.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          E 1 Reply Last reply 21 Oct 2018, 21:19
          2
          • S SGaist
            21 Oct 2018, 20:44

            @elfring said in Software development challenges around setHorizontalHeaderLabels():

            These two types of models share a common ancestor, that's all.

            It is usual that these classes were derived from a known base.

            What I was stating is that QSqlTableModel was not inheriting from QStandardItemModel but both had a common base.

            @elfring said in Software development challenges around setHorizontalHeaderLabels():

            It took another while to recognise where they are different in significant ways.
            I hope that a software transformation will become possible for better cooperation between mentioned programming interfaces.
            Can there be a mapping between these development approaches?

            Why would there be ? If you want custom header data with the SQL models, you can either use a proxy model like QIdentityProxyModel, use a QSqlQueryModel with a properly crafted query or subclass QSqlTableModel to return the headers you want.

            E Offline
            E Offline
            elfring
            wrote on 21 Oct 2018, 21:19 last edited by
            #5

            If you want custom header data with the SQL models, you can either use a proxy model …

            I imagine that further functions can be added to both classes.

            Where would you like to introduce the support for translations, internationalisation or localisations (for example)?

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 22 Oct 2018, 06:01 last edited by
              #6

              @elfring said in Software development challenges around setHorizontalHeaderLabels():

              Where would you like to introduce the support for translations, internationalisation or localisations (for example)?

              Is it really so hard to first take a look at the documentation of a project before permanently asking question answered already there?
              http://doc.qt.io/qt-5/internationalization.html

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              E 1 Reply Last reply 22 Oct 2018, 07:52
              4
              • C Christian Ehrlicher
                22 Oct 2018, 06:01

                @elfring said in Software development challenges around setHorizontalHeaderLabels():

                Where would you like to introduce the support for translations, internationalisation or localisations (for example)?

                Is it really so hard to first take a look at the documentation of a project before permanently asking question answered already there?
                http://doc.qt.io/qt-5/internationalization.html

                E Offline
                E Offline
                elfring
                wrote on 22 Oct 2018, 07:52 last edited by
                #7

                http://doc.qt.io/qt-5/internationalization.html

                This information source can be fine in principle.

                I am struggling with further software evolution around specific data models.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 22 Oct 2018, 13:12 last edited by
                  #8

                  What further software evolution ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  E 1 Reply Last reply 22 Oct 2018, 13:30
                  1
                  • S SGaist
                    22 Oct 2018, 13:12

                    What further software evolution ?

                    E Offline
                    E Offline
                    elfring
                    wrote on 22 Oct 2018, 13:30 last edited by
                    #9

                    What further software evolution ?

                    You might occasionally find SQL data models more promising, don't you?

                    1 Reply Last reply
                    0

                    7/9

                    22 Oct 2018, 07:52

                    • Login

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