It can be simply achieved with style sheets:
Qt Code:
  1. button->setStyleSheet("
  2. border-image: url(button.png) 3 10 3 10;
  3. border-top: 3px transparent;
  4. border-bottom: 3px transparent;
  5. border-right: 10px transparent;
  6. border-left: 10px transparent;
  7. ");
To copy to clipboard, switch view to plain text mode 
Sample from Qt Documentation. More here: http://doc.trolltech.com/4.6/stylesheet.html