Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Remove Borders around a QLabel

    General and Desktop
    2
    4
    4969
    Loading More Posts
    • 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
      BibekKumar last edited by

      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 Reply Quote 0
      • B
        BibekKumar last edited by

        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 Reply Quote 0
        • G
          giesbert last edited by

          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 Reply Quote 0
          • B
            BibekKumar last edited by

            yes , you are right Gerolf..

            1 Reply Last reply Reply Quote 0
            • First post
              Last post