you should not pass this as a parent to hbox layout.. see the comment in your code below
Quote Originally Posted by cpsmusic View Post
I tried the following:

Qt Code:
  1. QHBoxLayout *hbl = new QHBoxLayout(this);//REMOVE "this" just use - new QHBoxLayout();
To copy to clipboard, switch view to plain text mode 

however I'm getting the following error:

QLayout: Attempting to add QLayout "" to QFileDialog "QFileDialog", which already has a layout