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. Tab stop width in Qt text object
Forum Updated to NodeBB v4.3 + New Features

Tab stop width in Qt text object

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 652 Views
  • 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.
  • A Offline
    A Offline
    Andrea
    wrote on last edited by
    #1

    Hi everybody,

    It's been few days I'm working around how to modify tab stop width and set it in a QLabel object.
    Searching in the forum and in Google, really few posts could be found about it, but what I've learned is that QLabel is not the best object to use for this purpose, maybe it could be a better idea using QTextEdit, even if it much more than I need (just display one line of text).

    So, to explain my purpose, I just want to read text from a Xml file and write it in a label that will be displayed in the UI. In the text there could be an escape character like '\t', so my application knows it has to put a tab spacing at that point, in a manner that on the left there is the "label id" and on the right the specific "value" of the label; something like this:

                                   label1_Model                  Model_ABCD
                                   label2_Id                     Serial
                                   label3_Rev                    0.00
    

    Any idea of what could be the best way to do that?

    Many thanks
    Andrea

    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