Python Forum

Full Version: Showing text in QTableView
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to implement a simple view to which my program would then export data from a text file to show, which should look like this:

Image 1

However, after making a window with QTableView in Qt Designer there is only a blank white space and nothing like a table:

Image 2

As much as I understand, one has to come up with a model which would allow entry of information into QTableView. But I have no idea how to create that model. Also, I'm not really quite sure how one can deliver parsed data form a text file to the QTableView.

Can you please help me with the following:

- How does one set a model for QTableView? Where does that model come from?
- How does one export data to QTableView cells after they are created?

Would appreciate your help.