Qt QListView Tutorial

Qt QListView Tutorial

In my last article, I am write about toturial how to use QTableView. In this tutorial, I am try to write about Qt QListView Tutorial. The QListView class provides a list or icon view onto a model. That is like with QTableView. QListView support only one column (if you get a method how to create multiple column with QListView, maybe you can let me know 🙂 ). So, if you want to create mutliple column, you can use QTreeView or QTableView than QListView.

Below is a basic sample code how to use QListView (Qt QListView Tutorial). This code create a QListView, fill QListView with data, and show QListView program. From this Qt QListView Tutorial, you can extend to your program to more complex. Create a file, save with “listviewexample.cpp“, copy this text :

Continue reading