Multi Process in a Widget
-
Hi
QDockWidgets can be embedded and torn off to window.
http://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html
They can also be tabbed. -
-
@LeeDaShen said in How to use QT5 to develop multi process. Like a browser's multiple tabs on an interface. Can also be dragged out as a separate process.:
as a separate process
No, its just a window.
Nothing in Qt will let you drag anything out from a mainwindow and it becomes process on its own.That you need to hand code if you want that.
You would use QProcess to start a new instance of your application and instruct it which
"thing" to open as current. -
@LeeDaShen
You are welcome.
http://doc.qt.io/qt-5/qprocess.html
Give you all you need to start stop the process(es).You will need to give it arguments when you start it, so it can start up with the "data" you torn
off.You could use
http://doc.qt.io/qt-5/qdockwidget.html#topLevelChanged
Signal to know when user made it float.
Then you would hide/remove it and start your app again (second time)
with QProcess to get a new process running. -
@LeeDaShen
Well you need to handle that in main.You can use
QCoreApplication::arguments().at(1) (2,3,4,5)to read paramters. There are also
QCommandLineParser for more features. -
@LeeDaShen
Nope. Im not even sure what that means. -
@LeeDaShen
In which way, login ?
The browser dont have any login . Do you mean the user?