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. [Solved] Change tab size with QTextStream
Forum Updated to NodeBB v4.3 + New Features

[Solved] Change tab size with QTextStream

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.1k 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.
  • S Offline
    S Offline
    silep
    wrote on last edited by
    #1

    Hello,

    My program write a number matrix in a QFile thanks to QTextStream. All the values are separated by a tabulation. But if a number is to big in the matrix, the following values are moved on the right side than the other lines. To avoid that, I would like to increase the size of tab when I write the file. Would anyone know how to do that?

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      That is for the reader to work out. The tab will be translated to a \t character. The viewer should then be set to select the tab space.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • S Offline
        S Offline
        silep
        wrote on last edited by
        #3

        Thank you for your reply!
        I'm not sure to understand: how could I set the viewer to select the tab space?

        1 Reply Last reply
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          Which viewer do you use??? Notepad? Notepad++? Or is it the QTextBrowser?
          For the QTextBrowser (QTextEdit inherrited) use the setTabStopWidth()

          Greetz, Jeroen

          1 Reply Last reply
          0
          • S Offline
            S Offline
            silep
            wrote on last edited by
            #5

            I use Notepad++. I know about the setTabStopWidth(), but I can't use it in this case, I think..

            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