QTextEdit doesn't display its corner with border-radius



  • Hello,
    My problem is that I can't make my subclass of QTextEdit have rounded borders.
    Because when I use the stylesheet property border-radius, the corners are not displayed.

    // In my TextEdit constructor :
    setStyleSheet("border: 1px solid; border-radius:10px;");
    

    ScreenShot
    I use Windows 10 with Qt5.5.1
    I hope you will be able to help me...
    (and sorry for the bad english, I'm french ^^)


  • Moderators

    Hi, welcome to devnet.

    Looks like a small bug in the way stylesheets are applied. You can workaround it by explicitly setting a background color:

    setStyleSheet("border: 1px solid; border-radius:10px; background-color: palette(base); ");
    


  • @Chris-Kawa It works ! Thanks for all ^^


Log in to reply
 

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