Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////
- ///MainWindowStruct.h
- ///////////////////////
- #ifndef QTCL_MainWindowStruct_H
- #define QTCL_MainWindowStruct_H
- //Headers
- #include <QMainWindow>
- struct Qt_MainWindow
- {
- QMainWindow* This;
- };
- #endif//QTCL_MainWindowStruct_H
- ////////////////////////
- ///MainWindow.h
- ///////////////////////
- #ifndef QTCL_MainWindow_H
- #define QTCL_MainWindow_H
- //Headers
- #include <Config.h>
- typedef struct Qt_MainWindow Qt_MainWindow;
- QTCL_API Qt_MainWindow* Qt_MainWindow_create();
- QTCL_API void Qt_MainWindow_show(Qt_MainWindow* window);
- QTCL_API void Qt_MainWindow_destroy(Qt_MainWindow* window);
- #endif//QTCL_MainWindow_H
- ////////////////////////
- ///MainWindow.cpp
- ///////////////////////
- //Headers
- #include <MainWindow.h>
- #include <MainWindowStruct.h>
- Qt_MainWindow* Qt_MainWindow_create()
- {
- Qt_MainWindow* temp = new Qt_MainWindow;
- temp->This = new QMainWindow();
- return temp;
- }
- void Qt_MainWindow_show(Qt_MainWindow* window)
- {
- window->This->show();
- }
- void Qt_MainWindow_destroy(Qt_MainWindow* window)
- {
- delete window->This;
- delete window;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement