Anslem
22nd April 2014, 13:47
Hi guys, as you might have guessed i'm new to QT.
I need to write a Server/client file manager, basically a file explorer as it is in Windows but for client/server.
From my limited knowledge in QT i decided to use QFileSystemModel class on the server.
With this in mind, i'll have to 1)send files hierarchy to a client 2)if client wants to exapand some directory all i have to do is to send QModelIndex to the server and it will reply with a new hierarchy.
Question is, how do i send QFileSystemModel to the client? Serialization, maybe? As i understand it i can't directly serialize a QFileSystemModel object. But i can get a list of it's child objects and serialize it. Can i deserialize it on the client side and create new QFileSystemModel object using this list?
Or maybe you could suggest a better way to write this class, or use other classes?
Thank you in advance.
I need to write a Server/client file manager, basically a file explorer as it is in Windows but for client/server.
From my limited knowledge in QT i decided to use QFileSystemModel class on the server.
With this in mind, i'll have to 1)send files hierarchy to a client 2)if client wants to exapand some directory all i have to do is to send QModelIndex to the server and it will reply with a new hierarchy.
Question is, how do i send QFileSystemModel to the client? Serialization, maybe? As i understand it i can't directly serialize a QFileSystemModel object. But i can get a list of it's child objects and serialize it. Can i deserialize it on the client side and create new QFileSystemModel object using this list?
Or maybe you could suggest a better way to write this class, or use other classes?
Thank you in advance.