| Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
Hi, I have noticed QObject and everything below it is not serializable (through the interface serializable). Is it not possible to serialize Qt? David
On Thursday 17 August 2006 13:25, David Naylor wrote: > Hi, > > I have noticed QObject and everything below it is not serializable (through > the interface serializable). Is it not possible to serialize Qt? > > David Hi David, please give us some more information. Can you describe a usage case where you used serialization of GUI objects, with e.g. Swing? How well is this currently supported in SWT? Matthias
Hi Matthias I'm sorry but I have never used serialization for any GUI object. The only reason I have noticed this is I was trying to serialize a class that extends QObject and uses QSingal*. I do think serialization would be nice on QDate, QVariant and similar. As far as I know, all of Swing is serializable but I have never done anything with that. One hyperthetical use is streaming GUI's across networks and such. The python equivalent of dynamicly loading ui files (from a file)? Just a suggestion, someone might have a need to use it but if I understand how Qt-Jambi works, all the data is stored in c++, which could be a big problem to make serializable in java. David On Thursday 17 August 2006 18:04, Matthias Ettrich wrote: > On Thursday 17 August 2006 13:25, David Naylor wrote: > > Hi, > > > > I have noticed QObject and everything below it is not serializable > > (through the interface serializable). Is it not possible to serialize Qt? > > > > David > > Hi David, > > please give us some more information. Can you describe a usage case where > you used serialization of GUI objects, with e.g. Swing? How well is this > currently supported in SWT? > > > Matthias
If we would like to use Qt Jambi for something like Java Web Start or instant client, we would need to have serialized objects. Have there been any consideration about using Qt Jambi in Java Web Start applications ? Reidar M. Sollid David Naylor wrote: > Hi Matthias > > I'm sorry but I have never used serialization for any GUI object. The only > reason I have noticed this is I was trying to serialize a class that extends > QObject and uses QSingal*. I do think serialization would be nice on QDate, > QVariant and similar. > > As far as I know, all of Swing is serializable but I have never done anything > with that. One hyperthetical use is streaming GUI's across networks and > such. The python equivalent of dynamicly loading ui files (from a file)? > > Just a suggestion, someone might have a need to use it but if I understand how > Qt-Jambi works, all the data is stored in c++, which could be a big problem > to make serializable in java. > > David > > On Thursday 17 August 2006 18:04, Matthias Ettrich wrote: >> On Thursday 17 August 2006 13:25, David Naylor wrote: >>> Hi, >>> >>> I have noticed QObject and everything below it is not serializable >>> (through the interface serializable). Is it not possible to serialize Qt? >>> >>> David >> Hi David, >> >> please give us some more information. Can you describe a usage case where >> you used serialization of GUI objects, with e.g. Swing? How well is this >> currently supported in SWT? >> >> >> Matthias > > > >
Reidar M. Sollid wrote: > > If we would like to use Qt Jambi for something like Java Web Start or > instant client, we would need to have serialized objects. > Have there been any consideration about using Qt Jambi in Java Web > Start applications ? Hi, Reidar. Yes, we have experimented with this and successfully run the Qt Jambi Demo Launcher with Java Web Start. What do you need serializable objects for in your Web Start application? -- Eskil
Eskil A. Blomfeldt wrote: > Reidar M. Sollid wrote: > >> >> If we would like to use Qt Jambi for something like Java Web Start or >> instant client, we would need to have serialized objects. >> Have there been any consideration about using Qt Jambi in Java Web >> Start applications ? > > Hi, Reidar. > > Yes, we have experimented with this and successfully run the Qt Jambi > Demo Launcher with Java Web Start. What do you need serializable objects > for in your Web Start application? > > -- Eskil > > > Hi Eskil, If you you have made it without serializable objects I can not think of any. Sorry my mistake. Reidar
Reidar M. Sollid wrote: > > > Eskil A. Blomfeldt wrote: >> Reidar M. Sollid wrote: >> >>> >>> If we would like to use Qt Jambi for something like Java Web Start or >>> instant client, we would need to have serialized objects. >>> Have there been any consideration about using Qt Jambi in Java Web >>> Start applications ? >> >> Hi, Reidar. >> >> Yes, we have experimented with this and successfully run the Qt Jambi >> Demo Launcher with Java Web Start. What do you need serializable >> objects for in your Web Start application? >> >> -- Eskil >> >> >> > > Hi Eskil, > > If you you have made it without serializable objects I can not think of > any. Sorry my mistake. > > Reidar > And of course, Java Web Start is moving a jar file and not objects. Must have been a bit tired yesterday :) Reidar
On Thursday 17 August 2006 22:56, David Naylor wrote: > I'm sorry but I have never used serialization for any GUI object. The > only reason I have noticed this is I was trying to serialize a class > that extends QObject and uses QSingal*. I do think serialization would > be nice on QDate, QVariant and similar. For various frameworks I build the on-the-wire communication was serialized Java objects which makes it very convenient to communicate without having to write your own xml writer/readers. This is a great feature that is used by many. This in contrast to serializing Swing objects. While i have seen some companies use that, its mostly because they didn't know a better way. Many data objects that Qt provides have serializable equivalents in the Java standard library, so an easy way to go is to just provide methods that will allow you to do the relevant conversions. For example; QDate (the Java class) would have public java.util.Date toDate(); public static QDate fromDate(java.util.Date date); That said; I have no experience in mixing JNI and serializable, so maybe its really easy to get support if you try :) -- [ signature omitted ]
Attachment:
pgp6MpRLtRSvd.pgp
Description: PGP signature