Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMdiArea and new instance of program
Qt 6.11 is out! See what's new in the release blog

QMdiArea and new instance of program

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JulienMaille
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JulienMaille
        wrote on last edited by
        #3

        Thanks for the hint.
        Some of those old Qt Solutions have been merged with Qt. Are you sure this one has not?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Quite sure this one has not. Or do you see a QSingleApplication class in your QAssistant?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            AFAIK it was not merged. But it's pretty easy to use and works like a charm... :-)

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved