Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • 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
Forum Updated to NodeBB v4.3 + New Features

How to add new source and header file in existing project

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.9k 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.
  • S Offline
    S Offline
    sidharth
    wrote on 18 May 2013, 08:41 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 18 May 2013, 18:02 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

      1/2

      18 May 2013, 08:41

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved