Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Chrome like tab with separate process for each?



  • I need to create a multi tabbed window with each window as a separate process. I intend to use QProcess for this so that if one crashes then the other tabs can still be functional. Please help



  • @ankita-thakur
    What do you think each sub-process is going to do in any tab? If you think it is going to do UI input/output in the tab, it is not.



  • @JonB I am not sure i got you question. Perhaps i will explain the details of the problem:

    • On launching the application a QMainQWindow should appear which is a tabbed view. Each tab belongs to a different instance of an object like Patient. Each Tab will be representing the information of a patient.
    • I need to keep the tabs as separate processes so that if one of the tabs crashes the others still remain active.
    • At one point of time i would need only one active tab which means only one active process


  • @ankita-thakur
    But what are these "processes" doing? You cannot attach a process to a tab per se.

    There are other ways of keeping things going if something "crashes". All I can say it does not sound right to me.....



  • If you have a list of Qprocess ; then do 2-3 for each Qprocesses

    1. Create QtabWidget
    2. add widget for each process & start Process ; use connect signal errorOccurred(QProcess::ProcessError error) and at finished
    3. when error occurred and it's corresponding tab of tabWidget close it.


  • @jonb
    The Process will fetch data for each Patient and displays it in a QWidget which is displayed in the tabs where each tab correspond to one patient.Please refer the screenshot.

    Also please suggest any other way to handle crash and also data safety such that the Patient1 data is not accessible to Patient2



  • But what happens when the gui dies? Each process cannot be a gui unless it owns its own window. You could have a separate window for each. If you have a process communicating to a tab somehow, if the gui holding all the tabs dies, then everything dies.

    It would be better to shoot for reliable than some idea of separation of processes. Also, if the processes are on the same machine then they can access each other. So separating data from each other is not very practical.



  • @ankita-thakur said in Chrome like tab with separate process for each?:

    The Process will fetch data for each Patient and displays it in a QWidget which is displayed in the tabs

    I have now tried to ask several times. You have a working subprocess which displays output in a widget in the parent process? How? How does it access the widget? Maybe you know more than I do



  • @anil_arise

    Thanks for the response. Can you elaborate for point 2. How can we create different processes and add as tabbed widgets.


Log in to reply