Qt Forum

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

    How to implement border-image effect, in QWidget .

    General and Desktop
    3
    3
    5113
    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.
    • S
      summerheart last edited by

      @
      QPushButton {
      border-image: url(:/images/button.png) 16;
      border-width: 16px;
      padding: -16px 0px;
      }
      @
      When I use the above code to implemented border-image effect, it can work properly in QPushButton. When I want it to work in QWidget,
      the failed.
      how to implement border-image effect, in QWidget .
      Qstyle ?
      or other ?
      how?

      1 Reply Last reply Reply Quote 0
      • T
        t3chNo last edited by

        QWidget does not have border. Try QFrame

        1 Reply Last reply Reply Quote 0
        • T
          tobias.hunger last edited by

          A custom paint method will of course get you the required effect:-)

          I doubt that QFrame is the way to go.

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