Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to store execute output to variable?
Qt 6.11 is out! See what's new in the release blog

How to store execute output to variable?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 636 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.
  • S Offline
    S Offline
    samecodeninja16
    wrote on last edited by
    #1

    I want to check if executable is present and it version using "myapp --version" and if it is greater thatn current version then I should display user about this and let user decide to choose whether to continue or to quit. Now I need to perform execute operation for "myapp --version" and how can I store this output to variable to proceed further calculations ? Or is there any easier way there to do it ?

    jsulmJ 1 Reply Last reply
    0
    • S samecodeninja16

      I want to check if executable is present and it version using "myapp --version" and if it is greater thatn current version then I should display user about this and let user decide to choose whether to continue or to quit. Now I need to perform execute operation for "myapp --version" and how can I store this output to variable to proceed further calculations ? Or is there any easier way there to do it ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @samecodeninja16 https://doc.qt.io/qt-5/qprocess.html
      https://doc.qt.io/qt-5/qprocess.html#readyReadStandardOutput

      Sorry, just realised it is about the installer (Qt Installer Framework), right?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • jsulmJ jsulm

        @samecodeninja16 https://doc.qt.io/qt-5/qprocess.html
        https://doc.qt.io/qt-5/qprocess.html#readyReadStandardOutput

        Sorry, just realised it is about the installer (Qt Installer Framework), right?

        S Offline
        S Offline
        samecodeninja16
        wrote on last edited by
        #3

        @jsulm Yes its about the installer.

        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