because I want to develop CLI app
in .pro file, I set Because QStandardModelItemModel is a GUI class
because I want to develop CLI app
in .pro file, I set Because QStandardModelItemModel is a GUI class
Last edited by madawg; 13th November 2018 at 02:08.
Yes, QStandardItemModel requires the QtGui library but it does not require you to use a GUI. You can have a usable command-line only application and use the standard model. It may have issues running in an environment without X though... haven't tried.
You state you want a QAbstractItemModel interface. That interface is in QtCore so you can do this without QtGui. Take a look at Editable Tree Model Example. It is not trivial to fully implement a model, but the example goes through a working internal data structure and extensions for editing.
Last edited by ChrisW67; 13th November 2018 at 05:24.
madawg (13th November 2018)
Bookmarks