Nominate our 2022 Qt Champions!

How to implement a simultaneous file editing?

  • Hey!

    I just started using Qt and playing with it currently. It is still a huge mystery box to me, so I spent most of my time in the documents but now I couldn't figure out where to look so I came here.

    I'm currently making a clone IDE/Code Editor type of program. I basically just added compile option to basic notepad example with QProcess which works. Now what I want to do is to implement a simultaneous file editing, or turn my program into online coding platform clone.

    I was thinking maybe I could store some users in MySQL database. And when user1 opens a new document and invites user2, they both can edit user1's document. is a nice example to what I mean.

    I don't want anyone to just come up with a direct solution. My intention is to learn but I couldn't find a starting point. I saw Session Management page but I'm not sure if that's what I need. I would be really happy if anyone would show me the way.

    Btw, I'm on a Windows platform if that matters.

    Thanks in advance!

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Session Management won't help in the sense of managing multiple users simultaneously. It's to give your application the means to react to a user session stopping or when a power down is triggered.

    As for your editor. you will likely have to have one central server and your IDE will be a client.

  • Thank you! I'll dig into that asap

Log in to reply