Operations in a QTablewidget
-
Hello,
i am trying to do some operations (multiplication, addition) to some prices to have a bill in QTablewidget, i ask you to if this is the best way to do that or i can find better ??
Thanks you in advance.
-
Hi
A QTableWidget could be fine for a simple bill.
Do you need to also print it ? -
@YassineKira
hi
well Excel can read a CSV file so you can export it to that very easy format.
That is easy to code.if you need to directly write to a native excel file you can look into
https://github.com/QtExcel -
@YassineKira
hi
Both can be used. Its mostly the same excecpt qtablewidget has its own internal model it uses where as qtableview wants you to create your own model.
If you need to share the data between more than just the qtablewidget, then the
view version is better but else the qtablewidget will do fine.