How to add new source and header file in existing project
i am very new to qt.i have one main window and on that main window i have created 3 layers of widget.in each layer i want to draw something using paintevent.
i want that each widget should have my seperate source file and header file that should be visible in my project.how can i do that .please help me with each steps from starting onward and how to promote my widget in ui.
any help will be appreciated.
If you use Qt Creator:
- Add New- > Qt Design Form Class, Derive from QFrame for example. Name is for example MyFrame
- Insert content
- Open the main window in the designer
- Add a QFrame
- Right click in the main form: "Promoted Widgets". Add your MyFrame here. Derive from QFrame
- Right click on the QFrame inside the main window: Promote to->MyFrame