I solved the problem:

Qt Code:
  1. QString styleSheet = "QWidget#MyOwnClass {background-color:rgb(%1, %2, %3)}";
To copy to clipboard, switch view to plain text mode 

Now it works.
But I don't now why the other syntax don't work.

Thanks for your efforts