We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question 开发者_StackOverflowI'm looking for general-purpose container/collection classes (e.g., lists, maps) that emit Qt signals when items are added or removed.
I know the standard Qt container classes don't do it. Anyone know of any OSS library that has observable containers?
I realize there are issues with templates and Qt features. If it were easy, I'd just do it myself instead of looking for an existing one. :)
Thanks.
But it is easy :) Just don't try subclassing the container class. Create a QObject subclass that contains an instance of the container you want to use and write Add and Remove methods that emit the signals you want when they are called.
精彩评论