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. QProcess output lines are truncated to 80 columns
Forum Updated to NodeBB v4.3 + New Features

QProcess output lines are truncated to 80 columns

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 414 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.
  • MuratUrsavasM Offline
    MuratUrsavasM Offline
    MuratUrsavas
    wrote on last edited by
    #1

    I'm having an interesting issue with QProcess. If I debug the process (a standard Linux command) and try to get the output with readAllOutputStandard(), I see that each line has been truncated to 80 characters.

    If I debug it via running it in terminal or just run it with or without terminal everything seems fine, line lengths are OK and I can get all output without any truncation.

    Why is there such difference and how can I disable (or increase) this 80 character limit on the QProcess output while debugging?

    Regards,

    JonBJ 1 Reply Last reply
    0
    • MuratUrsavasM MuratUrsavas

      I'm having an interesting issue with QProcess. If I debug the process (a standard Linux command) and try to get the output with readAllOutputStandard(), I see that each line has been truncated to 80 characters.

      If I debug it via running it in terminal or just run it with or without terminal everything seems fine, line lengths are OK and I can get all output without any truncation.

      Why is there such difference and how can I disable (or increase) this 80 character limit on the QProcess output while debugging?

      Regards,

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @MuratUrsavas
      Start by showing what command you actually execute, plus your code dealing with the QProcess and reading output? And I don't understand what/how you are saying you are debugging?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @MuratUrsavas said in QProcess output lines are truncated to 80 columns:

        If I debug the process (a standard Linux command) and try to get the output with readAllOutputStandard(), I see that each line has been truncated to 80 characters.
        ???
        That should be sufficient description of the issue.

        My current usage "shows " almost 200 characters.

        In my search I found QProcess has inherited form QIODevice

        and this note

        qint64 QIODevice::peek(char * data, qint64 maxSize)
        Reads at most maxSize bytes from the device into data, without side effects (i.e., if you call read() after peek(), you will get the same data). Returns the number of bytes read. If an error occurs, such as when attempting to peek a device opened in WriteOnly mode, this function returns -1.

        Perhaps further search for "maxSize" could answer the question.

        1 Reply Last reply
        0

        • Login

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