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. How to make a QPushButton appear as a shaped back button similar to iOS?
Forum Updated to NodeBB v4.3 + New Features

How to make a QPushButton appear as a shaped back button similar to iOS?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.3k Views 3 Watching
  • 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.
  • EddieE Offline
    EddieE Offline
    Eddie
    wrote on last edited by
    #1

    Basically a rectangle, with a triangular arrow shape on left-side:

    Example:

    http://cssnerd.com/wp-content/uploads/2013/03/Screen-Shot-2013-03-09-at-22.13.01-600x367.png

    Thanks in advance,

    -Ed

    simowS 1 Reply Last reply
    0
    • EddieE Eddie

      Basically a rectangle, with a triangular arrow shape on left-side:

      Example:

      http://cssnerd.com/wp-content/uploads/2013/03/Screen-Shot-2013-03-09-at-22.13.01-600x367.png

      Thanks in advance,

      -Ed

      simowS Offline
      simowS Offline
      simow
      wrote on last edited by simow
      #2

      @Eddie you can either use QPushButton::setIcon(const QIcon& icon), but that just paints the graphic on a standard push button leaving the frame visible. If you want to change that I am afraid you have to go deeper and override the paintEvent(QPaintEvent *e) method of QPushButton.

      Let's Try To Negotiate!

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Or just use a custom image with a stylesheet: button->setStyleSheet("background-image: url(...)")

        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