Results 1 to 10 of 10

Thread: using the ui file

  1. #1
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default using the ui file

    hi all,

    i wonder when i make changes in the ui file, does the qtcreator create the corresponding code in the cpp file? because mine doesn't, and i dont see a point having a ui file then.

    thanks all

    mehmet

  2. #2
    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: using the ui file

    if you change an ui-files, uic-tool only generates new header files.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using the ui file

    what do you mean, mine doesnt even generate header files.

  4. #4
    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: using the ui file

    uic - only generates h-files for propper ui-file, it doesn't take care about cpp-file. you should modify them manually.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using the ui file

    ok thanks a lot, i didnt know that but, whats the point of creating buttons and editing slots and signals using the ui file then, if i'm gonna have to code it anyway? is it just for previews?

    thanks in advance

  6. #6
    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: using the ui file

    no, it's not a preview -- all signals and slots will work in your app, because uic add QMetaObject::connectSlotsByName in generated ui-file. but you should be careful, you can add connection for some control by your self and that can cause then some lots will be called twice (it depens on how many connection do you have + 1 , because of this QMetaObject::connectSlotsByName calling).
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  7. #7
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: using the ui file

    Quote Originally Posted by meozeren View Post
    what do you mean, mine doesnt even generate header files.
    Is the .ui file listed in your .pro file?
    J-P Nurmi

  8. #8
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using the ui file

    qtcreator doesnt open my .pro file. i dont know why but it just doesnt.

  9. #9
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using the ui file

    Then you should kick his .....
    anyways.. tell us how u open the file?

  10. #10
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using the ui file

    using open under the file menu of qtcreator

Similar Threads

  1. Read binary from file
    By weldpua2008 in forum Newbie
    Replies: 2
    Last Post: 3rd April 2009, 23:50
  2. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 15:54
  3. 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
  4. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.