Getting widget from other app?
-
Hi,
I have my app i.e. App1, where I have some QWidgets (as containers). In other app i.e App2 there are some other widgets like QLabel, QCheckBox and so on. That other app should have a possibility to show its widgets in my app.
Any idea how can I do it?
I tried to get WId of picked widget (by using winId() method) and create windowContainer for that widget, but there is many problems related to it.I can't do this by using QWidget::find(WId id) because this is in-process, and that two apps (App1 and App2) are two separetly processes.
I don't know if I wrote it clearly, so if something is to explain I will try to do this.
-
Hi,
why do you need to do that ?
Thanks -
I need it to display widgets from other apps in my app.
The problem is that I never know what kind of widgets it would be. Only what I can get from that external app (not the same process as mine) is WId of widget that should be displayed. -
Can you get by with just an image of what is displayed. That's easy enough to send to another app. Otherwise I would suggest you write your own serializer and deserializer of the widget you want to recreate. It would not be trivial to write such methods for widgets, I believe it would be much easier to do with QML.
[quote author="never_ever" date="1417017105"]I need it to display widgets from other apps in my app.
The problem is that I never know what kind of widgets it would be. Only what I can get from that external app (not the same process as mine) is WId of widget that should be displayed.[/quote]