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. QLabel Display Issue
Forum Updated to NodeBB v4.3 + New Features

QLabel Display Issue

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

    Hello All,

    My code is:

    ui->label->setText("\\\\HELLOWORLD1234\\FILE_NAME\\");
    ui->label->setWordWrap(true); 
    

    The problem that i face is that when the Point Size of the font is set to 13 whole text is displayed properly, but when it is incremented by 1 i.e. it is set to 14 then only a single backslash is visible in the label. Output is: \

    Kindly give me suggestions how to resolve this issue.

    Thanks
    Siddharth
    :)

    1 Reply Last reply
    0
    • P Offline
      P Offline
      primem0ver
      wrote on last edited by
      #2

      I could be totally off here (as this is a very basic answer) but in my experience this kind of thing usually happens when the control is too small to fit the text. Since you have no "breaks" for words in your text the results can be a bit odd. Does it do the same thing when you send a false parameter to setWordWrap?

      S 1 Reply Last reply
      0
      • P primem0ver

        I could be totally off here (as this is a very basic answer) but in my experience this kind of thing usually happens when the control is too small to fit the text. Since you have no "breaks" for words in your text the results can be a bit odd. Does it do the same thing when you send a false parameter to setWordWrap?

        S Offline
        S Offline
        Sidii
        wrote on last edited by
        #3

        @primem0ver
        Thanks for the reply.

        When i commented the setWordWrap line then whole text is displayed correctly, So this concludes that the other characters after first backslash are moving to the next line.
        :)

        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