what is wrong
Qt Code:
  1. ----> mainwindow.h
  2. #include <QVBoxLayout>
  3. ...
  4. private:
  5. QVBoxLayout *layoutGrupos;
  6.  
  7. ---->mainwindow.cpp
  8. layoutGrupos = new QVBoxLayout();
To copy to clipboard, switch view to plain text mode 
I do not understand what is wrong above

but when I declare all in the cpp it works ! why ??
Qt Code:
  1. ---->mainwindow.cpp
  2. QVBoxLayout *layoutGrupos = new QVBoxLayout();
To copy to clipboard, switch view to plain text mode