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


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
@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? -
@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?@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
-
@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? -
@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
@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... -
@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... -
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. -
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.@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?
-
@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?
-
@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 -
@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.
@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.
-
@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.
@wrosecrans I will read anything but not the QT documentation.
-
@wrosecrans I will read anything but not the QT documentation.
@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)?
-
@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.
-
@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
@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.
-
@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.
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 awesomeYou 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.