Well, I do have a class in my application, which I named DataCenter, and it inherits from QObject too.
This class' methods are oftenly called, and I haven't noticed any performance issue yet.
Well, I do have a class in my application, which I named DataCenter, and it inherits from QObject too.
This class' methods are oftenly called, and I haven't noticed any performance issue yet.
this is what i have currently too. (and makes perfectly sense)
but i have in this "datacenter" many other objects (hundreds) - and wanted to know how this performs...
niko
Oh ok, I got your point...I don't know then
The best you could do is try![]()
from my experience deleting objects which inherit QObject
is very slow. i developed an application with
some 100.000 objects and it became a problem
there (was Qt3.1). maybe that changed in the new Qt versions.
you have to try it.
usually Qt is very well designed and performs quiet fast.
what is the reason you want to subclass QObject?
regards,
jh
i want to emit a signal when data has changed. (to the "datacenter")
looks like i have to try it
thanks,
niko
if you want avoid sublassing QObject you can write a
'messaging'-class which provides a method to
send signals. you only have to create one object of this class
and you can use it for thousands of data-objects.
jh
An alternative is to only access the small objects through the datacenter interface.
The performance-cost of using signals/slots depends on how often the small objects change. If this happens only once in a while, it doesn't matter.
"The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry
Bookmarks