Something like this would be better:
Qt Code:
  1. QHBoxLayout *l = qobject_cast<QHBoxLayout *>(gb->layout());
  2. if(l) l->setDirection( QBoxLayout::TopToBottom );
To copy to clipboard, switch view to plain text mode