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. QTreeView ans setTabStopWidth
Qt 6.11 is out! See what's new in the release blog

QTreeView ans setTabStopWidth

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 3.2k 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.
  • D Offline
    D Offline
    dlodyakov
    wrote on last edited by
    #1

    Hi. I have QTreeView ans QStandardItemModel. In model I have text with tabs ('\t). So by default tab space is 80 pixels ans I need to set it to 40 pixels. I can't find how can I do this. Can you help me?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dlodyakov
      wrote on last edited by
      #2

      Ok. I replaced it.
      text = text.replace("\t", " ");
      But maybe you need to add this feature in future - set tabstopwidth in treeview.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        [quote author="dlodyakov" date="1311259483"]
        But maybe you need to add this feature in future - set tabstopwidth in treeview.[/quote]

        Feel free to add a "feature request":https://bugreports.qt.nokia.com.

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dlodyakov
          wrote on last edited by
          #4

          Are you shure that qt don't have this feature?

          [quote author="mlong" date="1311259712"]
          [quote author="dlodyakov" date="1311259483"]
          But maybe you need to add this feature in future - set tabstopwidth in treeview.[/quote]

          Feel free to add a "feature request":https://bugreports.qt.nokia.com.

          [/quote]

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mlong
            wrote on last edited by
            #5

            Not that I'm aware of. (At least not in a straightfoward way that I've seen.)

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              You might want to step up and add the feature yourself, after which you can request it to be merged into Qt.

              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