Results 1 to 4 of 4

Thread: i want to use QtDesigner file(.ui file) in My Existing Project??

  1. #1
    Join Date
    Jul 2010
    Location
    Ahmedabad,Gujarat,India
    Posts
    25
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default i want to use QtDesigner file(.ui file) in My Existing Project??

    Sir,
    one more Question..
    I m using Qt4.6.2... i want to use QtDesigner file(.ui file) in My Existing Project.... how i got .h(header file) and .cpp(Class File) from .ui files....
    uic(command) give on Header File... if uic work with my qt this version then how it's done?? give me steps??

    Thanks Sir.

  2. #2
    Join Date
    Mar 2008
    Posts
    52
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: i want to use QtDesigner file(.ui file) in My Existing Project??

    Hi pavan,
    In Qt4.6.2 there is no way to getting the .h file and .cpp files.. So please do this manner copy that file name and add the new GUI User Class with same name.that time you will get .h , .cpp and .ui files. Now you just select all the previous Ui File content and copy into new .UI file that time you got code every thing.(I think that is the solution for that) using uic compiler you won't get the .h and .cpp files.. So that as my knowldge I preffered this way..


    Thanks& regards,
    Tavit.

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: i want to use QtDesigner file(.ui file) in My Existing Project??

    The class.cpp and class.h are your code it's not the uic duty to provide those.
    uic will provide only one header, after that you need to learn how to use that header.

    So just add the .ui file to the project and code a class (with private *ui, or with multiple inheritance) it's not that hard (you can use the method Tavit said, but anyway you will need to add functions/functionality to that class so that copy-paste thing only saves you about 10 lines of code)

    Here is the documentation on how to use/add ui with your code.

  4. The following user says thank you to Zlatomir for this useful post:

    pavanbarot (4th August 2010)

  5. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: i want to use QtDesigner file(.ui file) in My Existing Project??

    Also, please do not use visitor messages to ask questions. They will be ignored.

  6. The following user says thank you to squidge for this useful post:

    pavanbarot (4th August 2010)

Similar Threads

  1. How to save an existing file
    By rk0747 in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2010, 10:11
  2. Replies: 1
    Last Post: 3rd December 2009, 23:34
  3. Replies: 2
    Last Post: 28th March 2009, 10:11
  4. printing a(n existing) file in Qt
    By caduel in forum Qt Programming
    Replies: 3
    Last Post: 21st July 2008, 07:20
  5. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.