Remove Borders around a QLabel



  • 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.



  • 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.



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



  • yes , you are right Gerolf..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.