Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any observable Qt container classes? [closed]

I'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.

like image 216
Chris Avatar asked Jul 14 '11 13:07

Chris


1 Answers

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.

like image 162
Arnold Spence Avatar answered Nov 16 '22 01:11

Arnold Spence