[Solved]How to set single column from Qsqltablemodel to Qlistview?
General and Desktop
4
Posts
3
Posters
1.7k
Views
1
Watching
-
Hi,
I have a Qsqltablemodel in which there is a table from sql database. now i want to give only one column to edit to user and i want to store that table again in database after save button clicked . So, i have added a Qlistview in mainwindow.ui. But it seems very difficult to add one single column from model to this view. Is there any class which will give me directly one column which i can set to list view and after editing can easily add in that model again ? -
Hi,
To set the column you want to use just call setModelColumn
Hope it helps