Results 1 to 9 of 9

Thread: fgets in Qt(Gui mode)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    23
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: fgets in Qt(Gui mode)

    It's a 18 years old legacy code written in "C" contains 2,86063 lines with fgets in more than 100 places.
    I have already created GUI for that with all interface,if no other option I will have to go for this bull work.Before this I want to be 100% sure that there is no other way than to change the whole code and replace it with "QInputDialog/QFileDialog" etc...

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: fgets in Qt(Gui mode)

    i dont have exp in console apps... and your situation is unique...

    if i were u then i would just search and replace the fgets as

    Qt Code:
    1. search
    2. fgets(char*,xx,xx,xx);
    3. replace with
    4. myFgets(char*,xx,xx,xx);
    5.  
    6. its a very easy thing and u dont have to do anything if u use any text editor..
    7.  
    8. then make your function
    9. myFgets(char* str,xx,xx,xx)
    10. {
    11. str=(convert string char by char);
    12. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    May 2009
    Posts
    23
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: fgets in Qt(Gui mode)

    Sorry I didn't explain the whole scenerio. My application has two modes "GUI" and "Console" ,user can opt for any using Config file(which I have yet to create). Application has to read that file and load the application accordingly(console/gui mode).

    Now my problem is how can I do this? I don't want two different exe for console and GUI
    That's why I am searching for some solution to control console using GUI so that only one exe is enough.

Similar Threads

  1. Solutions for invoking QWhatsThis Mode
    By ike in forum Qt Programming
    Replies: 9
    Last Post: 28th May 2009, 19:18
  2. Replies: 9
    Last Post: 15th April 2009, 06:23
  3. Not able to execute in Release Mode
    By sudheer168 in forum Qt Programming
    Replies: 4
    Last Post: 18th March 2009, 11:58
  4. Replies: 2
    Last Post: 22nd July 2007, 19:21
  5. qodbc driver not loaded error in release mode
    By mandal in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2006, 09:42

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
  •  
Qt is a trademark of The Qt Company.