HI, I have mainform class that has got a member object WIDGETGL; widgetGL show some GL objects that are members of StructureGL; there's only one instance of StructureGL (ok); I declared it as global variabile inside mainform.ui.h; in others part of app that StructureGL is request I used extern declaration...
Qt Code:
  1. //mainform.ui.h
  2. StructureGL strutGL;
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. //WIDGETGL.cpp
  2. extern StructureGL strutGL;
  3. void WIDGETG::paintGL()
  4. structGL.drawSPhere();
To copy to clipboard, switch view to plain text mode 
the question: can it be ok? Is it better declare strutGL as member of mainform class? or what? thanks...