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:

    1. Add New- > Qt Design Form Class, Derive from QFrame for example. Name is for example MyFrame
    2. Insert content
    3. Open the main window in the designer
    4. Add a QFrame
    5. Right click in the main form: "Promoted Widgets". Add your MyFrame here. Derive from QFrame
    6. Right click on the QFrame inside the main window: Promote to->MyFrame

    jochen


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.