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. Create QPushButton with icon from vector image with custom size

Create QPushButton with icon from vector image with custom size

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 718 Views
  • 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.
  • NiagarerN Offline
    NiagarerN Offline
    Niagarer
    wrote on last edited by Niagarer
    #1

    Hi!
    I want to create a QPushButton (and place it in a QGraphicsProxyWidget later) with a custom icon in SVG format.

    myButton->setGeometry(0, 0, 80, 80);
    myButton->setIcon(QIcon(":/Images/cursor_normal.svg").pixmap(QSize(w,h)));
    

    Setting w and h on something unter 10 does make a recognizable difference (still really small), but if I go higher, like 50 50, it does not get any bigger, even though the pushbutton is larger, as you can see.
    Any idea, what I missed? This is surely some kind of rookie error

    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