Here's your problem:
Qt Code:
  1. setFixedHeight(sizeHint().height());
To copy to clipboard, switch view to plain text mode 

Print out the value of sizeHint().height() and see why it fails.