PDA

View Full Version : QWidgets and processes



mihaiadrian
19th May 2010, 16:14
Does anybody now how I can draw 2 QWidget's (qpushbuttons, qwebviews, etc) on a parent qwidget, but this 2 widgets to run on different processes(and the parent on other process). It is possible ? The ideea is that if one qwidget crashes from a seg fault, to prevent all application crash.

More exacly I need is something like in chromium(wich in not qt) where evrey tab, evrey plugin run on sepparate process. I don't now how I can display GUI elements running on different proceses.

tbscope
19th May 2010, 16:20
You have the logic all wrong.

Your GUI runs in one thread, the main thread. Do not ever split a GUI in multiple threads
The logic, dataprocessing, ... runs in another thread or process.
You update your GUI by using events from your other threads or processes.
If one thread or process "crashes", then only that part crashes and you update your GUI by deleting or hiding that part that handles that specific thread or process.

mihaiadrian
19th May 2010, 16:27
if one thread crashes with seg fault, the application(process) crashes - so this doesn't help me. I need an application compose from multiple processes (not threads).

tbscope
19th May 2010, 16:38
I didn't say you need to use threads.
I said you shouldn't split your GUI in several threads.