Advertisement
Guest User

Untitled

a guest
May 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. class YourClass {
  2.  
  3. public:
  4.   YourClass (QMainWindow mainwindow_ptr)
  5.   {
  6.     m_mainwindow = (unsigned int)mainwindow_ptr;
  7.   }
  8.  
  9. private:
  10.   unsigned int m_mainwindow_ptr;
  11. }
  12.  
  13.  
  14.  --------
  15. when you want something, write that:
  16.  ((QMainWindow *)this->m_mainwindow_ptr)->function_from_QMainWindow_class();
  17.  
  18.  -------
  19. and to create:
  20.  
  21.  
  22. QMainWindow *wnd;
  23. YourClass *y = new YourClass(wnd);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement