Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to add new source and header file in existing project
Qt 6.12 LTS is out! See what's new in the release blog

How to add new source and header file in existing project

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JochenBaier
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved