Hi
I am trying to add space b/w rows and column of gridlayout but it is not working.
I have 2*2 gridlayout like the following

Qt Code:
  1. QGridLayout *layout = new QGridLayout;
  2. layout->setAlignment(Qt::AlignCenter);
  3.  
  4. layout->addWidget(button_panic, 0, 0);
  5. layout->setHorizontalSpacing(5);
  6. layout->addWidget(button_gas, 0, 1);
  7. layout->setVerticalSpacing(5);
  8. layout->addWidget(button_alarm, 2, 0);
  9. layout->setHorizontalSpacing(5);
  10. layout->addWidget(button_fire, 2, 1);
  11. this->setLayout(layout);
To copy to clipboard, switch view to plain text mode 

How to add space b/w widgeta laid in layout.