Results 1 to 5 of 5

Thread: No refresh .ui

  1. #1
    Join Date
    Sep 2014
    Location
    Spain
    Posts
    14
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default No refresh .ui

    Hello,
    I change the .ui file for example I add a label with design but in the .cpp file I can't add a value because this label isn't recognize.
    And when I run the application the result is previous. I try the forder to debug but I have the same problem.
    What can I do? thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: No refresh .ui

    Check that you have modified the file you assume you have modified.
    Check that the .ui file is correctly listed in your project's FORM variable.

    Cheers,
    _

  3. #3
    Join Date
    Sep 2014
    Location
    Spain
    Posts
    14
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: No refresh .ui

    That's ok, if I check the xml I can see the correct source:

    Qt Code:
    1. <widget class="QLabel" name="label_2">
    2. <property name="geometry">
    3. <rect>
    4. <x>190</x>
    5. <y>150</y>
    6. <width>57</width>
    7. <height>14</height>
    8. </rect>
    9. </property>
    10. <property name="text">
    11. <string>TextLabel</string>
    12. </property>
    13. </widget>
    14. </widget>
    To copy to clipboard, switch view to plain text mode 

    And in the .cpp file it is put:
    Qt Code:
    1. #include "ui_mainwindow.h"
    To copy to clipboard, switch view to plain text mode 

    But in the terminal if I do qmake, make, ./nameproyect I can see the correct changes.
    This problem don't happen in all my proyects.

    Thanks

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No refresh .ui

    After you modify ui file, you should run qmake to generate latest headers.
    Or atleast clean and build your application. That should take the latest updated files.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: No refresh .ui

    That shouldn't be necessary.
    qmake generates uic rules for all .ui files it finds listed in the FORMS variable.

    QtCreator even parses the .ui files on change for code completion.

    Cheers,
    _

Similar Threads

  1. Refresh my Qt window
    By maarvi in forum Newbie
    Replies: 6
    Last Post: 8th May 2011, 20:31
  2. Refresh Ui...?
    By steve.bush in forum Newbie
    Replies: 5
    Last Post: 21st March 2011, 06:21
  3. Replies: 2
    Last Post: 14th January 2011, 16:09
  4. Can't seem to get QGraphicsView to refresh
    By smahnken in forum Qt Programming
    Replies: 18
    Last Post: 29th August 2008, 09:32
  5. Refresh Issue
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 14th August 2008, 19:34

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.