i'm looking for the code to order the elements in a table in my database with the id of the element increasing from 1...n
i'm looking for the code to order the elements in a table in my database with the id of the element increasing from 1...n
Is your table table a QTableWidget or a QTableView?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hello;
it is QtableView !!
thank you for your help !!
based on your question style, my guess is that you are not very experienced with Qt or C++.
I would urge you to make sure QTavleWidget does not meet your needs since it has sorting built in to it.
If it must be a QTableView, then you have to use a sorting proxy model.
See here on how:
http://doc.qt.io/qt-5/qtwidgets-item...l-example.html
Ask here if you have *specific* questions.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks