On Tue, July 1, 2014 00:05, Jonathan Wilkes wrote: > On 06/30/2014 03:30 PM, Alejandro Exojo wrote: > I suppose I am looking for a kind of UI protocol. Here's another > question-- do you know any cross-platform apps with a Qt GUI that talks > to the "main" process over a socket?
I've written a few of those - I always wrote the protocol myself on top of QTcpSocket or QLocalSocket. The protocol you are using right now is probably a good starting point - you'll just have to write your command parser yourself. I recommend using a registry(*) for your main items and use their IDs just like you used the Tk item/widget names as "command", then interpret the remainder of the commands - it usually is a simple matter of using QString::split and handing the result to some hierarchy of methods to do the evaluation of the components. (*) QMap<int,QGraphicsItem*>registry; or the better QMap<int,QPointer<MyPdItemClass> >; with MyPdItemClass containing enough logic to work in the context of your program as well as taking care of item deletion, etc. I would also recommend updating the protocol to exchange high-level information instead of actual widget commands - more like "item1234 setActive 1" instead of ".item1234 setColor green". Konrad _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
