Warning, /sdk/cutehmi/extensions/CuteHMI.2/dev/CuteHMI-1.solved.Qt.design.txt is written in an unsupported language. File is not indexed.
0001 Problem: 0002 0003 Qt Model/View doesn't take into account indirect const-correctness. 0004 0005 QAbstractItemModel::createIndex(), in overriden ProjectModel::index() const, expects 0006 non-const pointer to child node. Child node can affect parent however, so for given 0007 parent to obtain its non-const child, a non-const version of child() function should 0008 be used. Because root node is a member of ProjectModel non-const root.child() can not 0009 be called in ProjectModel::index() const. 0010 0011 Workaround: 0012 0013 Use const_cast to remove const from root node. 0014 0015 Snippet: 0016 0017 Solution: 0018 0019 ProjectModel has been removed from CuteHMI.2.