QMdiArea and new instance of program
-
Hi folks, I just wrote a basic report viewer and I would like to open file from my main application with it.
This viewer has a QMdiArea, hence I would it to have a correct behavior.- When closed and called from main app: run the application and open the report
- When already running and called: do not start a new instance and open a new tab instead.
Do you guys have any example I could look at to handle this?
Thanks a lot -
There is a "Qt Solution":http://doc.qt.nokia.com/solutions/4/qtsingleapplication/index.html for that.
I guess the "code":https://qt.gitorious.org/qt-solutions can still be found in Gitorious.
-
Thanks for the hint.
Some of those old Qt Solutions have been merged with Qt. Are you sure this one has not? -
Quite sure this one has not. Or do you see a QSingleApplication class in your QAssistant?
-
AFAIK it was not merged. But it's pretty easy to use and works like a charm... :-)