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. Remove Borders around a QLabel
QtWS25 Last Chance

Remove Borders around a QLabel

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 5.6k 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.
  • B Offline
    B Offline
    BibekKumar
    wrote on last edited by
    #1

    I have added one qlabel in my application's statusbar . And now I have been trying to remove the borders around the QLabel.

    @label->setFrameShape(QFrame::HLine);
    label->setFrameStyle(QFrame::NoFrame);
    // label->setLineWidth(0);
    //label->setMidLineWidth(0);@

    I tried everything above, none of them work, any help is appreciated.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BibekKumar
      wrote on last edited by
      #2

      i got the solution

      You do this with Style sheets. You probably have a line like this Application app(argc, argv);

      underneath that, add one like this: app.setStyleSheet("QStatusBar::item { border: 0px solid black }; ");

      and those pesky boxes will be gone.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        I just wanted to say: it's a statusbar problem, not a label problem :-)

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BibekKumar
          wrote on last edited by
          #4

          yes , you are right Gerolf..

          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