On Fri, Mar 1, 2019 at 10:29 PM Jérôme Godbout <godbo...@amotus.ca> wrote:
> Why is the struct deleted one the signal is finished? You create a > structure only for the signal? it’s not an object or data that will outlive > that call in the end? If so, you really need to make a copiable > representation of the struct. > Yes it is just an object created for the time of the signal, to avoid having 5 parameters to my signal. > > > What kind of data live into your struct? are they all basic type or > pointer? or do you have QObject into it? > > QVariantMap seem like an easy way out. > it is (for now) just integers, I just tried QVariantMap (just after my previous email), I find it good enough, I will stay with this I think. > JSON serialization or even better QDataStream (which is really fast > compare to JSON) could help you do it. You could do an operator<<() and > operator>>() with QDataStream on your struct to do it. QByteArray are > copiable. > > > > If you can provide more information about your struct data that could help. > it is just basic data for now. But I would really wish that Qt could do that for us so I can just keep on using my structure.
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest