Announcement

Collapse
No announcement yet.

[SOLVED] What to use to make GUI's for termial apps

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: [SOLVED] What to use to make GUI's for termial apps

    Originally posted by toad
    Thanks, tanderson.

    But is QT not for C++ only? Or can one use it for simple bash scripts as well? Or python, ruby, what have you?

    The key Qt4 API to consider when using QtCreator to write a GUI to execute a script (or to run an executable binary) is QProcess.
    Detailed Description
    The QProcess class is used to start external programs and to communicate with them.
    To start a process, pass the name and command line arguments of the program you want to run as arguments to start(). For example:
    QObject *parent;
    ...
    QString program = "./path/to/Qt/examples/widgets/analogclock";
    QStringList arguments;
    arguments << "-style" << "motif";

    QProcess *myProcess = new QProcess(parent);
    myProcess->start(program, arguments);
    QProcess then enters the Starting state, and when the program has started, QProcess enters the Running state and emits started().
    QProcess allows you to treat a process as a sequential I/O device. You can write to and read from the process just as you would access a network connection using QTcpSocket. You can then write to the process's standard input by calling write(), and read the standard output by calling read(), readLine(), and getChar(). Because it inherits QIODevice, QProcess can also be used as an input source for QXmlReader, or for generating data to be uploaded using QFtp.
    Since you probably wouldn't be loading a database or creating documents within Qt so about all you'd need is a MainWindow class, some labels to name script switches, and input textboxes, checkboxes or radio buttons to accept their settings, and a couple buttons to "Ok" or "Cancel" the action, and an "Exit" button.

    The API gives more information about QProcess and how to interact with the process you've started, tell when it is over, and the results of its activities.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #17
      Re: [SOLVED] What to use to make GUI's for termial apps

      Where do I get QtCreator? What other IDE or whatever it is called could I use apart from QtCreator?
      Multibooting: Kubuntu Noble 24.04
      Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
      Win XP, 7 & 10 sadly
      Using Linux since June, 2008

      Comment


        #18
        Re: [SOLVED] What to use to make GUI's for termial apps

        For Arch you have it in AUR - and I'll bet my life on it that there is a repo for Kubuntu somewhere...

        Question is, are there any tutorials which a half wit like me can follow?
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #19
          Re: [SOLVED] What to use to make GUI's for termial apps

          Originally posted by kyonides
          Where do I get QtCreator? What other IDE or whatever it is called could I use apart from QtCreator?
          I am running Kubuntu 9.04 beta5, upgraded to KDE 4.2.1.

          QtCreator is in the repository.
          Before you install it you may want to install the
          Qt4 designer -- for making graphical User Interfaces (*.ui)
          Qt4 assistant -- integrated API and docs, context sensitive
          Qt4 linguist -- i18n integration for making automatic language conversions
          gdb -- debugging tool, which is also integrated
          and the g++ 4.3.2 compiler (even though the 4.3.3 compiler is probably already installed by default).
          Generally, install everything you see that starts with "Qt4-". and for your scripting work libqt4-scripts and libqt4-scripttools, or something like that... my memory isn't what it used to be.

          You may have to enter a symbolic link to make a connection between gcc and g++ because QtCreator expects to see the compiler as g++. Try to compile a simple app first. IF it fails with some error about "Make" then use konsole to add the 4.3.2 compiler and the link below.
          Code:
          sudo ln -s /usr/bin/gcc-4.3 /usr/bin/g++
          The QtCreator is an AWESOME gui IDE that rivals MS Visual Studio C++. It includes auto-completion, stepwise graphical debugging with all of its power and much more. I spent the last three years running MS Visual Studio C++ with Trolltech's Qt4 integration tool supplying the Qt connectivity, but working with MSVS was a "do all" pita. QtCreator is for Qt4.... custom fit like a silk glove.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #20
            Re: [SOLVED] What to use to make GUI's for termial apps

            Well, in the last few days I've been looking for QtCreator in the repos and couldn't find it... The designer, assistant and linguist were there, though...
            Multibooting: Kubuntu Noble 24.04
            Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
            Win XP, 7 & 10 sadly
            Using Linux since June, 2008

            Comment


              #21
              Re: [SOLVED] What to use to make GUI's for termial apps

              Originally posted by kyonides
              Well, in the last few days I've been looking for QtCreator in the repos and couldn't find it... The designer, assistant and linguist were there, though...
              I just tried to find it again and it IS there. Use "qt-creator", or just "creator".

              The confusion comes because the dev team initially called it Qt-Creator, but lately seems to refer to it on the email list as QtCreator. I used "qtcreator" when I first looked for it but couldn't find it using that, either.

              I recommended installing the Qt4 SDK apps because QtCreator is in the repository as the IDE only. From QtSoftware http://www.qtsoftware.com/downloads it comes as either a 200+ Mb SDK, which includes the Qt4 SDK libraries and the IDE, or the 118 Mb IDE only, which assumes you already have the Qt4 SDK installed.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #22
                Re: [SOLVED] What to use to make GUI's for termial apps

                Code:
                sudo apt-get --simulate install qt-creator
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                E: Couldn't find package qt-creator
                Code:
                sudo apt-get --simulate install creator
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                E: Couldn't find package creator
                Multibooting: Kubuntu Noble 24.04
                Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
                Win XP, 7 & 10 sadly
                Using Linux since June, 2008

                Comment


                  #23
                  Re: [SOLVED] What to use to make GUI's for termial apps

                  time to post your /etc/apt/sources.list
                  Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                  Comment


                    #24
                    Re: [SOLVED] What to use to make GUI's for termial apps

                    Originally posted by toad
                    time to post your /etc/apt/sources.list
                    Code:
                    jerry@jerry-sonylaptop:~$ cat /etc/apt/sources.list       
                    #deb cdrom:[Kubuntu 9.04 _Jaunty Jackalope_ - Alpha i386 (20090226)]/ jaunty main restricted
                    # See [url]http://help.ubuntu.com/community/UpgradeNotes[/url] for how to upgrade to          
                    # newer versions of the distribution.                            
                    
                    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty main restricted
                    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty main restricted
                    
                    ## Major bug fix updates produced after the final release of the
                    ## distribution.                        
                    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-updates main restricted
                    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-updates main restricted
                    
                    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
                    ## team. Also, please note that software in universe WILL NOT receive any 
                    ## review or updates from the Ubuntu security team.            
                    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty universe          
                    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty universe        
                    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-updates universe      
                    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-updates universe    
                    
                    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
                    ## team, and may not be under a free licence. Please satisfy yourself as to 
                    ## your rights to use the software. Also, please note that software in   
                    ## multiverse WILL NOT receive any review or updates from the Ubuntu
                    ## security team.
                    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty multiverse
                    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty multiverse
                    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-updates multiverse
                    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-updates multiverse
                    
                    ## Uncomment the following two lines to add software from the 'backports'
                    ## repository.
                    ## N.B. software from this repository may not have been tested as
                    ## extensively as that contained in the main release, although it includes
                    ## newer versions of some applications which may provide useful features.
                    ## Also, please note that software in backports WILL NOT receive any review
                    ## or updates from the Ubuntu security team.
                    # deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-backports main restricted universe multiverse
                    # deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] jaunty-backports main restricted universe multiverse
                    
                    ## Uncomment the following two lines to add software from Canonical's
                    ## 'partner' repository. This software is not part of Ubuntu, but is
                    ## offered by Canonical and the respective vendors as a service to Ubuntu
                    ## users.
                    # deb [url]http://archive.canonical.com/ubuntu[/url] jaunty partner
                    # deb-src [url]http://archive.canonical.com/ubuntu[/url] jaunty partner
                    
                    deb [url]http://security.ubuntu.com/ubuntu[/url] jaunty-security main restricted
                    deb-src [url]http://security.ubuntu.com/ubuntu[/url] jaunty-security main restricted
                    deb [url]http://security.ubuntu.com/ubuntu[/url] jaunty-security universe
                    deb-src [url]http://security.ubuntu.com/ubuntu[/url] jaunty-security universe
                    deb [url]http://security.ubuntu.com/ubuntu[/url] jaunty-security multiverse
                    deb-src [url]http://security.ubuntu.com/ubuntu[/url] jaunty-security multiverse
                    jerry@jerry-sonylaptop:~$
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #25
                      Re: [SOLVED] What to use to make GUI's for termial apps

                      Check out Visual Bash

                      http://grahams.free-online.co.uk/VisualBash.html

                      Graham.

                      Comment


                        #26
                        Re: [SOLVED] What to use to make GUI's for termial apps

                        I believe that Visual Bash is now defunct. At the very least it is hard to find. Most of the references on Google (except Wikipedia) lead to dead ends. The Wikipedia link confirms this. I conjecture that the reason for this is that Visual Bash was a Qt3/KDE3 project. It would have required a complete rewrite for KDE4. Apparently, this has not yet happened. Probably because Kdialog no longer exists. All of which leaves me with no satisfactory answer (for KDE4) to the original question.

                        The previous post in this revived thread comes from the author of Visual Bash (Graham). When followed, the link in that post promises the release of the KDE4 version Real Soon Now. If Visual Bash is soon to be resurrected, I suspect that there are folks at this site who might be willing to serve as beta testers.

                        Edit: My apologies, I mispoke (slightly). The beta is available now as a tarball, but it is not called a beta.

                        Comment

                        Working...
                        X