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. Qt Application to do Linux Command
QtWS25 Last Chance

Qt Application to do Linux Command

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 5.4k 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.
  • A Offline
    A Offline
    Ade Malsasa Akbar
    wrote on last edited by
    #1

    Bismillhirrahmanirrahim,

    I use QtCreator on Ubuntu. I wanna make an application that replace some Linux command. In example, if I click a button, it is same with bash command: cp /home/master/Downloads/app.exe /home. How to do that? At least, is there an example (or two) in this case? Or, is there suitable tutorial for this? This is my deep curiosity since I know Java and Qt few years ago, but I still newbie.

    Please tell me if I do repost and thank you so much.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can run other programs (including bash commands) using "QProcess":http://qt-project.org/doc/qt-4.8/qprocess.html. In this specific case, you can also use "QFile":http://qt-project.org/doc/qt-4.8/qfile.html#copy-2 to copy the files.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Ade Malsasa Akbar
        wrote on last edited by
        #3

        [quote author="sierdzio" date="1370003614"]You can run other programs (including bash commands) using "QProcess":http://qt-project.org/doc/qt-4.8/qprocess.html. In this specific case, you can also use "QFile":http://qt-project.org/doc/qt-4.8/qfile.html#copy-2 to copy the files.[/quote]

        Wow, amazing. So quick you answer my question! Thank you for this big clues. I got two swords: QProcess and QFile. But it is surely I want to use bash command only, I want to make my own GUI for CLI application.

        Is there any further tutorial or example programs? In this case, surely. Thank you.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          The documentation is pretty well written. I'm not that fluent in Qt tutorials, I mostly learn myself ;) But you can search or wait for some other bloke to reply.

          In any case, feel free to use my "QEasyShell":https://github.com/sierdzio/qeasyshell as reference or backend. It's probably too complex for a newcomer, though.

          (Z(:^

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Ade Malsasa Akbar
            wrote on last edited by
            #5

            Um, thank you so much. Even you created an application in this case. But I am completely new comer, in programming, more and more new in Qt. Thank you for your answers.

            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