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. Launching Gnome Terminal Stop QTimer
QtWS25 Last Chance

Launching Gnome Terminal Stop QTimer

Scheduled Pinned Locked Moved Unsolved General and Desktop
gnomeqtimerc++
6 Posts 2 Posters 2.0k Views
  • 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.
  • D Offline
    D Offline
    DougyDrumz
    wrote on 3 Jan 2017, 20:44 last edited by
    #1

    When I launch a gnome terminal from my QtGUI, the QTimer appears to be suspended until the gnome terminal is closed. Is there any way to fix that? The GUI that brings the gnome terminal up and the gnome terminal are not modal. I bring the gnome terminal up in the background. Do I need to put the gnome terminal in a sleep loop so the QTimer gets some CPU cycles?

    Dougy Drumz

    A 1 Reply Last reply 3 Jan 2017, 20:48
    0
    • D DougyDrumz
      3 Jan 2017, 20:44

      When I launch a gnome terminal from my QtGUI, the QTimer appears to be suspended until the gnome terminal is closed. Is there any way to fix that? The GUI that brings the gnome terminal up and the gnome terminal are not modal. I bring the gnome terminal up in the background. Do I need to put the gnome terminal in a sleep loop so the QTimer gets some CPU cycles?

      A Offline
      A Offline
      ambershark
      wrote on 3 Jan 2017, 20:48 last edited by
      #2

      @DougyDrumz Are you talking about launching the terminal with QProcess? If so it shouldn't have any impact on your current application for timers or blocking of threads or anything like that.

      Can you show some code for launching the process and the timer you are expecting to fire?

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      2
      • D Offline
        D Offline
        DougyDrumz
        wrote on 3 Jan 2017, 20:57 last edited by
        #3

        Yoiu know, I didn't use QProcess. Maybe that's what I should have done. Right now, a separete class (and executable) launches the gnome terminal using a system command.

        Dougy Drumz

        A 1 Reply Last reply 3 Jan 2017, 21:04
        0
        • D DougyDrumz
          3 Jan 2017, 20:57

          Yoiu know, I didn't use QProcess. Maybe that's what I should have done. Right now, a separete class (and executable) launches the gnome terminal using a system command.

          A Offline
          A Offline
          ambershark
          wrote on 3 Jan 2017, 21:04 last edited by
          #4

          @DougyDrumz That may be the issue. system may be blocking the thread which stops the timer from kicking off.

          Try converting to QProcess, it's super easy to use and see if you still have issues.

          If you don't want to convert, you can try putting that system call in it's own thread and see if that fixes things for you.

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          2
          • D Offline
            D Offline
            DougyDrumz
            wrote on 3 Jan 2017, 22:32 last edited by
            #5

            Worked like a charm! Thanks.

            Dougy Drumz

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DougyDrumz
              wrote on 3 Jan 2017, 22:32 last edited by
              #6

              QProcess that is.

              Dougy Drumz

              1 Reply Last reply
              0

              2/6

              3 Jan 2017, 20:48

              topic:navigator.unread, 4
              • Login

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