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. How to create Qt GUI app based on Linux command line tools
Forum Updated to NodeBB v4.3 + New Features

How to create Qt GUI app based on Linux command line tools

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k 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.
  • A Offline
    A Offline
    admd91
    wrote on 24 Jan 2015, 09:39 last edited by
    #1

    Hello everyone,

    I am new to Qt and programming, and I have a project that requires me to build an app that can scan wireless networks, list those networks, and connect to a selected network. My idea is to build a Qt-based GUI that calls on Linux command line tools like iw, ping, dhclient and wpa_supplicant. So instead of a user typing into the terminal, a user would just click a "scan" button, and connect to the desired network by clicking on a "connect" button.

    I researched on possible Qt classes and found QProcess can be used to take commands from the terminal. But I also read about a new class called QCommandLineParser, though I don't quite understand how to use it. Can anyone help me to understand how to build this project? I also know of existing tools like connman and the native Network Manager, but I do not know any Qt-based versions of those programs that I can use. I would greatly appreciate it if anyone can point me in the right direction.

    Thanks

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p3c0
      Moderators
      wrote on 24 Jan 2015, 14:58 last edited by
      #2

      Hi,

      QCommandLineParser is completely different from QProcess. It is a convenience class to ease the command line parsing if you are creating a Qt Console application (i.e non gui).
      Since you want to create Qt GUI application and want those external command line tools to be executed from the application then QProcess is exactly what you need.

      157

      1 Reply Last reply
      0
      • A Offline
        A Offline
        admd91
        wrote on 25 Jan 2015, 01:49 last edited by
        #3

        Thank you for this p3c0! I needed some clarification about QProcess and QCommandLineParser. Now I only need to focus on QProcess.

        1 Reply Last reply
        0

        1/3

        24 Jan 2015, 09:39

        • Login

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