Results 1 to 4 of 4

Thread: build a gui ontop of a console application

  1. #1
    Join Date
    Feb 2007
    Posts
    42
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default build a gui ontop of a console application

    hi, i have made a simple console application{using c++ and oop}...

    i want to build a gui ontop of it...My gui gui will be extremely simple.

    i.e two buttons {in QDialog} that will activate 2 functions of the application...

    The question is how to do this...
    I will remove every element of the console interface and i will connect the buttons to the functions ,but i dont want to

    throw away all my design....

    I know my question is too general, but i really cant be more specific...

    thanks for your time,

    N.A

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: build a gui ontop of a console application

    It depends if you want to integrate the gui with the console application (meaning - compile it as a single binary) or if you want them to be separate applications (so that the gui part calls the console app to do its job).

    In the first case, wrap the console code into functions/classes and call them in your gui. In the second case, use QProcess to spawn and control the backend (console app) from the frontend (gui app).

  3. #3
    Join Date
    Feb 2007
    Posts
    42
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: build a gui ontop of a console application

    yes i want to compile it as a single binary....

    Quote Originally Posted by wysota View Post
    In the first case, wrap the console code into functions/classes and call them in your gui.
    the problem is that i have a complex class hierarchy {about 10 classes}....So i just delete the code refering to the console ,and mix my classes with the gui classes?

    For the second case you suggested, it sounds interesting, is there any example i could look for?

    thanks for your time,
    NA

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: build a gui ontop of a console application

    Quote Originally Posted by aegis View Post
    the problem is that i have a complex class hierarchy {about 10 classes}....So i just delete the code refering to the console ,and mix my classes with the gui classes?
    Yes, something like that.

    For the second case you suggested, it sounds interesting, is there any example i could look for?
    For instance k3b, KDevelop...

Similar Threads

  1. Replies: 8
    Last Post: 28th January 2015, 09:45
  2. Build application using visual studio 6 ?
    By aamer4yu in forum Newbie
    Replies: 1
    Last Post: 3rd October 2006, 09:34
  3. Application build Mac PPC/Intel pro file?
    By patrik08 in forum Qt Programming
    Replies: 3
    Last Post: 28th June 2006, 13:27
  4. Replies: 0
    Last Post: 21st February 2006, 16:30
  5. Help sought on console + GUI Integration...
    By mysearch05 in forum Newbie
    Replies: 7
    Last Post: 28th January 2006, 14:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.