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. CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?
Qt 6.11 is out! See what's new in the release blog

CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 8 Posters 2.9k Views 2 Watching
  • 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.
  • C Offline
    C Offline
    CEO.
    wrote on last edited by
    #1

    inventory1.png invent9.jpg

    invent7.png

    Hello great minds,

    I am trying to prepare a stock record card for inventory management.

    Looking at the photos attached herein, is there a way I can create over 100,000 of the cards to hold records of over 100,000 items? I need ideas please

    jsulmJ 1 Reply Last reply
    0
    • C CEO.

      inventory1.png invent9.jpg

      invent7.png

      Hello great minds,

      I am trying to prepare a stock record card for inventory management.

      Looking at the photos attached herein, is there a way I can create over 100,000 of the cards to hold records of over 100,000 items? I need ideas please

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @CEO With https://doc.qt.io/qt-5/qtableview.html and a model should be possible.
      " is there a way I can create over 100,000 of the cards to hold records" - what does "card" mean here?

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

      C 2 Replies Last reply
      0
      • jsulmJ jsulm

        @CEO With https://doc.qt.io/qt-5/qtableview.html and a model should be possible.
        " is there a way I can create over 100,000 of the cards to hold records" - what does "card" mean here?

        C Offline
        C Offline
        CEO.
        wrote on last edited by
        #3

        @jsulm the card is like a table with columns containing records of individual items. Records such as item name, date, type of transaction, quantity, previous balance, current balance, officer on duty, etc.

        Again, please I don't like being directed to QT documentation, it usually adds to my stress. I would prefer any other tutorial website but not QT documentation site

        jsulmJ C 2 Replies Last reply
        0
        • jsulmJ jsulm

          @CEO With https://doc.qt.io/qt-5/qtableview.html and a model should be possible.
          " is there a way I can create over 100,000 of the cards to hold records" - what does "card" mean here?

          C Offline
          C Offline
          CEO.
          wrote on last edited by
          #4

          @jsulm I followed your link, where did it answer my question please?

          1 Reply Last reply
          0
          • C CEO.

            @jsulm the card is like a table with columns containing records of individual items. Records such as item name, date, type of transaction, quantity, previous balance, current balance, officer on duty, etc.

            Again, please I don't like being directed to QT documentation, it usually adds to my stress. I would prefer any other tutorial website but not QT documentation site

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @CEO said in CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?:

            the card is like a table with columns containing records of individual items

            Do you want to create 100000 tables in your app? Why? I hope not at the same time.
            "please I don't like being directed to QT documentation, it usually adds to my stress. I would prefer any other tutorial website but not QT documentation site" - reading documentation is actually one of the things a developer should do, but maybe I'm too old school... I don't have any links to tutorials, did you search by yourself for tutorials? Also, there are many many examples in Qt...

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

            C 1 Reply Last reply
            1
            • jsulmJ jsulm

              @CEO said in CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?:

              the card is like a table with columns containing records of individual items

              Do you want to create 100000 tables in your app? Why? I hope not at the same time.
              "please I don't like being directed to QT documentation, it usually adds to my stress. I would prefer any other tutorial website but not QT documentation site" - reading documentation is actually one of the things a developer should do, but maybe I'm too old school... I don't have any links to tutorials, did you search by yourself for tutorials? Also, there are many many examples in Qt...

              C Offline
              C Offline
              CEO.
              wrote on last edited by
              #6

              @jsulm I will appreciate more if I am directed to other websites where QT usage is taught, but NEVER to QT documentation. That shit gives me headache. lol

              I asked for an idea, your opinion and input, not to be directed elsewhere please. Thanks anyway.

              1 Reply Last reply
              0
              • JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by JoeCFD
                #7

                display the data only when they are needed to be showed.
                For example, send the corresponding data to a tab when its tab bar is clicked and clear the data of the tab when another tab bar is pressed. It is not a problem to keep 100000 data in memory. Simply do display on demand.
                If you need to display 100000 data in one table, you can try to create, for example 1000 row data . Then update the data when the user scrolls table up/down.

                C 1 Reply Last reply
                0
                • JoeCFDJ JoeCFD

                  display the data only when they are needed to be showed.
                  For example, send the corresponding data to a tab when its tab bar is clicked and clear the data of the tab when another tab bar is pressed. It is not a problem to keep 100000 data in memory. Simply do display on demand.
                  If you need to display 100000 data in one table, you can try to create, for example 1000 row data . Then update the data when the user scrolls table up/down.

                  C Offline
                  C Offline
                  CEO.
                  wrote on last edited by
                  #8

                  @JoeCFD hello Joe, thanks for your contribution, the issue is that daily the records get updated and the history of the update needs to reflect. I am considering using an afterUpdate trigger and then saving all the entries in the same table. What do you think please?

                  JoeCFDJ 1 Reply Last reply
                  0
                  • C CEO.

                    @JoeCFD hello Joe, thanks for your contribution, the issue is that daily the records get updated and the history of the update needs to reflect. I am considering using an afterUpdate trigger and then saving all the entries in the same table. What do you think please?

                    JoeCFDJ Offline
                    JoeCFDJ Offline
                    JoeCFD
                    wrote on last edited by JoeCFD
                    #9

                    @CEO you update your data stored in some type of arrows without updating the tables. On the tables do display on demand.
                    QDataWidgetMapper may be useful for you

                    C 1 Reply Last reply
                    0
                    • JoeCFDJ JoeCFD

                      @CEO you update your data stored in some type of arrows without updating the tables. On the tables do display on demand.
                      QDataWidgetMapper may be useful for you

                      C Offline
                      C Offline
                      CEO.
                      wrote on last edited by
                      #10

                      @JoeCFD hello Joe, please is there a way I can make the most recent 10 or 20 items display in the qTablewidget at the bottom of the data entry form? That is, I would want these records displayed as soon as the data entry form is displayed.

                      W 1 Reply Last reply
                      0
                      • C CEO.

                        @JoeCFD hello Joe, please is there a way I can make the most recent 10 or 20 items display in the qTablewidget at the bottom of the data entry form? That is, I would want these records displayed as soon as the data entry form is displayed.

                        W Offline
                        W Offline
                        wrosecrans
                        wrote on last edited by
                        #11

                        @CEO said in CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?:

                        @JoeCFD hello Joe, please is there a way I can make the most recent 10 or 20 items display in the qTablewidget at the bottom of the data entry form? That is, I would want these records displayed as soon as the data entry form is displayed.

                        Yes, it's possible. And the documentation includes a lot of information about how the table model works, how you can filter it, and how you can use signals and slots to trigger updates based on events. But since you refuse to read the documentation, I can't see any reason to try to write up a long answer since you wouldn't read that either, since it would have the same information in the documentation. Anyhow, good luck.

                        C 1 Reply Last reply
                        0
                        • W wrosecrans

                          @CEO said in CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?:

                          @JoeCFD hello Joe, please is there a way I can make the most recent 10 or 20 items display in the qTablewidget at the bottom of the data entry form? That is, I would want these records displayed as soon as the data entry form is displayed.

                          Yes, it's possible. And the documentation includes a lot of information about how the table model works, how you can filter it, and how you can use signals and slots to trigger updates based on events. But since you refuse to read the documentation, I can't see any reason to try to write up a long answer since you wouldn't read that either, since it would have the same information in the documentation. Anyhow, good luck.

                          C Offline
                          C Offline
                          CEO.
                          wrote on last edited by
                          #12

                          @wrosecrans I will read anything but not the QT documentation.

                          JKSHJ 1 Reply Last reply
                          0
                          • C CEO.

                            @wrosecrans I will read anything but not the QT documentation.

                            JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on last edited by
                            #13

                            @CEO said in CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?:

                            @wrosecrans I will read anything but not the QT documentation.

                            What is it that makes Qt documentation harder or more stressful to read than other API documentation (like cppreference or Boost)?

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply
                            2
                            • JonBJ Online
                              JonBJ Online
                              JonB
                              wrote on last edited by JonB
                              #14

                              @JKSH, @wrosecrans
                              This is a pretty pointless conversation. @CEO has said he is not prepared to read Qt documentation. He has also repeatedly stated he is not satisfied with the quality and content of replies he is getting in this forum. He demands that anybody who answers should write code and go find references to Qt examples/tutorials on the web, other than that supplied by Qt, which are acceptable to him. It's part of our duty to him.

                              What is strange is that he says he is happy with the format of answers he receives on stackoverflow. Yet persists in asking questions here --- though he is not at all prepared to phrase his questions of give the detail which is required for a stackoverflow post --- but not being satisfied with the replies he gets, rather than ask on stackoverflow, which is what I have previously he suggested he do.

                              @CEO
                              I am trying to be conciliatory/pragmatic now. This forum is more "casual" than stackoverflow which is more "formal". There the questioner must supply a small, correct description and often code for a question, and a lot of answers will contain an answer in code. Here we (try to) accept a less formal description of problems, and may well supply a less formal answer. It's just different styles/objectives/practices for a forum, and we like it this way. If you really want the rigour of stackoverflow you are better asking there, though you must be prepared to be equally rigorous in your presentation of a question.

                              With regard to your dislike of Qt documentation and references to it. You may be able to find alternative examples/tutorials if you/someone are prepared to hunt around the web. But you won't find a methodical, detailed description of every method supplied by Qt. That is in the Qt documentation only. Just saying.

                              Thank YouT 1 Reply Last reply
                              2
                              • C CEO.

                                @jsulm the card is like a table with columns containing records of individual items. Records such as item name, date, type of transaction, quantity, previous balance, current balance, officer on duty, etc.

                                Again, please I don't like being directed to QT documentation, it usually adds to my stress. I would prefer any other tutorial website but not QT documentation site

                                C Offline
                                C Offline
                                ChrisW67
                                wrote on last edited by
                                #15

                                @CEO said in CREATING OVER 100,000 QTABLE WIDGETS IN A PROJECT FILE. Is it possible?:

                                the card is like a table with columns containing records of individual items. Records such as item name, date, type of transaction, quantity, previous balance, current balance, officer on duty, etc.

                                You have answered your own question. You use a database containing tables with required columns. 100000 records is tiny. QSqlDatabase, QSqlQuery and friends.

                                You display them using a QTableView (one widget) displaying a QSqlTableModel (or the like). I will not tell you to read the documentation for the examples, but I also cannot give you a Youtube link to a video that will do your job for you.

                                1 Reply Last reply
                                1
                                • JonBJ JonB

                                  @JKSH, @wrosecrans
                                  This is a pretty pointless conversation. @CEO has said he is not prepared to read Qt documentation. He has also repeatedly stated he is not satisfied with the quality and content of replies he is getting in this forum. He demands that anybody who answers should write code and go find references to Qt examples/tutorials on the web, other than that supplied by Qt, which are acceptable to him. It's part of our duty to him.

                                  What is strange is that he says he is happy with the format of answers he receives on stackoverflow. Yet persists in asking questions here --- though he is not at all prepared to phrase his questions of give the detail which is required for a stackoverflow post --- but not being satisfied with the replies he gets, rather than ask on stackoverflow, which is what I have previously he suggested he do.

                                  @CEO
                                  I am trying to be conciliatory/pragmatic now. This forum is more "casual" than stackoverflow which is more "formal". There the questioner must supply a small, correct description and often code for a question, and a lot of answers will contain an answer in code. Here we (try to) accept a less formal description of problems, and may well supply a less formal answer. It's just different styles/objectives/practices for a forum, and we like it this way. If you really want the rigour of stackoverflow you are better asking there, though you must be prepared to be equally rigorous in your presentation of a question.

                                  With regard to your dislike of Qt documentation and references to it. You may be able to find alternative examples/tutorials if you/someone are prepared to hunt around the web. But you won't find a methodical, detailed description of every method supplied by Qt. That is in the Qt documentation only. Just saying.

                                  Thank YouT Offline
                                  Thank YouT Offline
                                  Thank You
                                  wrote on last edited by
                                  #16

                                  I would like to add some more things on @JonB .
                                  Really QT forum is most easiest and friendly forum I have ever been part of.

                                  I am 100% sure that , this question would be REJECTED/DELETEd in stack overflow FOR SURE. Question isn't exactly complete. Nobody knows about your project So You should try giving some more hints.
                                  Be thankful that peoples are giving time on your question. They are not here to write code for you(or atleast give some opinion), They are here to help You.
                                  And you are telling you don't wanna read documentation. Wow Superb. For me QT documentation is quite well documented, You may not learn everything but you can get at least concept of whats going there. And you can ask for those terms here.
                                  Really QT forum is awesome

                                  You display them using a QTableView (one widget) displaying a QSqlTableModel (or the like).

                                  If this helped you then this one can give you how much data can you show with model

                                  https://forum.qt.io/topic/128678/how-much-rows-can-tableview-handle/4

                                  BUT I would not suggest that , You can load data when you need , not whole at a time.

                                  Let's make QT free or It will go forever

                                  TRUE AND FALSE <3

                                  1 Reply Last reply
                                  2

                                  • Login

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