How To Style QPushButton Icon?
-
Hi
not sure the if the image-position works with icon but you could try
http://doc.qt.io/qt-5/stylesheet-reference.html#image-prop -
@mrjj Tried that. I can set a
background-image
to point to my image resource URL, and then usebackground-position
to position it, but it won't let me do anything except position names. It doesn't support pixel sizing like so:background-position:4px left;
-
@mrjj The only fix I could come up with was creating some transparent background space around the icon image itself, and then moving the icon within that space. I then deleted the old resource image and re-imported the new one. Now my icons line up properly with the text on the right.