Results 1 to 9 of 9

Thread: Is there a way to say QtCreator to rebuild the .ui file from .h?

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Is there a way to say QtCreator to rebuild the .ui file from .h?

    I have changed the .h file 'linked' to the .ui file
    (because I have deleted the statusbar and now I want it again)
    1.- Is there a way to say QTcreator 'rebuild .ui from .h ?'
    2.- Is there a way to add a statusbar in QTCreator?

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    Quote Originally Posted by tonnot View Post
    I have changed the .h file 'linked' to the .ui file
    (because I have deleted the statusbar and now I want it again)
    1.- Is there a way to say QTcreator 'rebuild .ui from .h ?'
    Not that I'm aware of. Did you delete the status bar using the designer?

    Quote Originally Posted by tonnot View Post
    2.- Is there a way to add a statusbar in QTCreator?
    QMainWindow has one by default. You can just use that one. Else call statusBar() in your code.

    Revision control for the win
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    Yes, I delete it from designer.
    And, I want to use it at the designer, not in code.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    Open the .h file generated from the ui file, scroll to the top and read the line containing the word "WARNING" as many times as you need until you understand it. Then go to the documentation and read the Using a Designer UI File in Your Application chapter. Pay special attention to sentences containing the word "subclass".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    Wysota, I know to read...
    This is the reason to make this 2 questions.
    1.- Is there a way to say QTcreator 'rebuild .ui from .h ?'
    2.- Is there a way to add a statusbar in QTCreator?

    It can be interesting to say QT People that include this functionality in next versions.
    For example, in this way a copy - paste operations could allow to build a menu from code. (for example). But I understand that it can be very difficult.
    Last edited by tonnot; 24th November 2010 at 10:12.

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,709
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    It can be interesting to say QT People that include this functionality in next versions.
    For example, in this way a copy - paste operations could allow to build a menu from code. (for example). But I understand that it can be very difficult.
    No, it wont be interesting for them.
    The designer is a help tool to help rapid ui design.
    The ui file is just a way to convey that information to your C++ code.
    ui's do not have any importance on their own.
    If you changed something in your code that changes the way your GUI looks like, then there is no need to change the ui back form the code, since your code is your application and it does what you want.
    Many people don't bother with ui's at all, but code everything manually.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    Yes, but If they want to have a century XXI's tool and win users, later or sooner they have to integrate code with UI in biunivocal way.

  8. #8
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,709
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    ok, you win.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Is there a way to say QtCreator to rebuild the .ui file from .h?

    Quote Originally Posted by tonnot View Post
    2.- Is there a way to add a statusbar in QTCreator?
    Yes, right click the form and choose "Add status bar". Not that you'll be able to do anything with the status bar from within Designer apart setting its properties...

    It can be interesting to say QT People that include this functionality in next versions.
    For example, in this way a copy - paste operations could allow to build a menu from code. (for example). But I understand that it can be very difficult.
    I don't think there are tools for painters to decompose paintings into blobs of paint and stuff that paint back into tubes.

    It's written numerous times in numerous places - never modify files that are generated on the fly (ever, not only in Qt). You are given mechanisms for modifying the looks and behaviour of UIs generated from .ui files in your code so use them. If you stride sideways and go your own way then you will be on your own. Deal with it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 9
    Last Post: 17th November 2010, 07:18
  2. Replies: 3
    Last Post: 5th August 2010, 09:18
  3. Create Torrent File And Upload Internet QtCreator
    By nhs_0702 in forum Qt Programming
    Replies: 4
    Last Post: 27th March 2010, 09:05
  4. QtCreator add a pri file without compiling it
    By bunjee in forum Qt Tools
    Replies: 1
    Last Post: 3rd May 2009, 13:35
  5. how to compile c++ source file in qtCreator
    By orky7 in forum General Programming
    Replies: 6
    Last Post: 20th March 2009, 06:45

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.