0

from the research I have done in order to set a picture as the button background you: right-click the button --> Change styleSheet --> Add Resource --> Edit Resource --> Create a folder and add a prefix and set it to be the picture --> go back once and select the picture and click ok --> and I get Invalid Style Sheet.

enter image description here

So the question is: What am I doing wrong and how do I do it right?

Matan
  • 73
  • 2
  • 14
  • Stylesheets need selectors, what you used is just a value that has no meaning without context. Use `background-image: url(:/path/to/image.png);`. – musicamante Mar 25 '20 at 14:36
  • @musicamante first the link won't help since I want to do it in the designer and not through code. and I tried writing it like you said "background-image: url(:/path/to/image.png);" but the picture still doesn't appear. [link](https://ibb.co/16dcJpM) – Matan Mar 25 '20 at 15:05
  • 1
    The fact that you use the stylesheet from code or from designer doesn't change anything, the underlying behavior is the same. I just tried with Designer and it works. Are you sure you're using the correct resource path? – musicamante Mar 25 '20 at 15:10
  • @musicamante I tried again and it worked I have no idea what I did differently, well thanks! – Matan Mar 25 '20 at 15:41

0 Answers0