Results 1 to 6 of 6

Thread: Stdout limitations

  1. #1
    Join Date
    Jun 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Stdout limitations

    I'm writing software and using Qprocess to start external console tool

    As you see on the screenshot every string in output is truncated to 80 characters.
    This output is from that external tool.
    What could i do to avoid this?

    scr07.jpg

  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: Stdout limitations

    You should ask that the author of this external tool.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Stdout limitations

    Maybe I should, but this tool works good in console and output in console is not truncated

    That's weird...

  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: Stdout limitations

    That's because the application queries the terminal for its properties. And since you don't have a terminal here, the program probably assumes 80 characters per line.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Stdout limitations

    What type of terminal (i.e. TERM variable) do you think the console-based program is using when run through QProcess? My guess is that it is "dumb" which has a definition of 80 columns:
    Qt Code:
    1. $ TERM=dumb tput cols
    2. 80
    To copy to clipboard, switch view to plain text mode 
    You need "dumb" if you do not want colour and other escape codes in the output.

    There's no "dumb-wide" or equivalent I can see. You may be able to arrange calling:
    Qt Code:
    1. stty cols 132
    To copy to clipboard, switch view to plain text mode 
    before running your desired console program or try setting TERM to "lpr" (line printer), "vanilla" or some other 132 column near-typewriter terminal.

  6. The following user says thank you to ChrisW67 for this useful post:

    damkrat (6th June 2012)

  7. #6
    Join Date
    Jun 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Stdout limitations

    Chris, thanks a lot!!!!! Now it's clear

Similar Threads

  1. Limitations to QPolygonF?
    By roband915 in forum Qt Programming
    Replies: 12
    Last Post: 24th May 2011, 14:55
  2. QTreeWidget Delegate setModelData limitations
    By kubas in forum Qt Programming
    Replies: 0
    Last Post: 8th September 2009, 08:40
  3. QHttp Limitations?
    By rage in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 25th September 2007, 11:58
  4. Replies: 5
    Last Post: 9th April 2007, 14:26
  5. QGraphicsScene/QGraphicsView window limitations
    By mistertoony in forum Qt Programming
    Replies: 11
    Last Post: 17th February 2007, 08:10

Tags for this Thread

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.