Results 1 to 3 of 3

Thread: How to load a .h or .cpp file in designer?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    143
    Thanks
    8

    Question How to load a .h or .cpp file in designer?

    I learned that i can get .h file if i compile the .ui file.

    Consider that i make some changes to that .h file and i want to get it back into the designer to make further changes, how can that be done??

    I get only a .h file, how can i create a application out of the .h file? I mean i need to have a exe which can load, once i double click it.

    thanks in advance.

  2. #2
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to load a .h or .cpp file in designer?

    You could subclass the generated class from the h-file. Probably implemement additional functionality, add a main() function, compile and link the whole bunch of files and be happy .

    And I think you should carefully read the Qt tutorial: http://doc.trolltech.com/4.4/tutorials.html

    And last, read this: http://doc.trolltech.com/4.4/designe...component.html
    This is part of the Qt Designer manual.
    I think "The Single Inheritance Approach" is the most commonly used approach to use "designed" components in an application.

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to load a .h or .cpp file in designer?

    it can not be done. changing generated h-file bad idea, because this file is generated automatically, so you should make changes in ui or in that cpp file which contains widget for which ui will be set up.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. how to create .cpp file of designer
    By sh123 in forum Qt Programming
    Replies: 8
    Last Post: 13th December 2008, 13:31
  2. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  3. how can i generate .cpp file in QT 4.3.0
    By gamitkumar in forum General Programming
    Replies: 4
    Last Post: 3rd September 2007, 22:23
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. Replies: 1
    Last Post: 18th March 2006, 10:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.