I tried the following:

Qt Code:
  1. MyFileDialog::MyFileDialog()
  2. {
  3.  
  4. QGridLayout* mainLayout = dynamic_cast<QGridLayout*>(layout());
  5.  
  6. if ( ! mainLayout ) {
  7. assert(0); // in case of future changes
  8. } else {
  9.  
  10. QHBoxLayout *hbl = new QHBoxLayout(this);
  11.  
  12. // add some widgets
  13. m_cb = new QCheckBox("My Checkbox");
  14. hbl->addWidget(m_cb);
  15.  
  16. int numRows = mainLayout->rowCount();
  17.  
  18. // add the new layout to the bottom of mainLayout
  19. // and span all columns
  20. mainLayout->addLayout( hbl, numRows,0,1,-1);
  21. }
  22. }
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