Results 1 to 3 of 3

Thread: Best Practice - Qt Designer or Code?

  1. #1
    Join Date
    Mar 2012
    Posts
    3
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Best Practice - Qt Designer or Code?

    I've been browsing the examples in the Qt Creater application and am amazed at what can be created with no form designer.

    One thing I noticed is that most of the project examples did not use the Qt Designer Ui forms. The majority of the widgets were added programmatically. I'm not sure if this is because it is the best practice or if it is due to keeping the examples simple. As a Visual Studio user, I'm used to having to place all objects in the designer and then go about making them work with actions.

    My question as someone embarking on a new project is...What is the consensus best practice for applications built with Qt? Should I plan on the majority of windows and widgets being created and placed in the underlying code or do most applications use the designer?

    Thanks in advance for your insights.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Best Practice - Qt Designer or Code?

    It's a pure personal choice. I arrange widgets myself if they are small. In all other cases I use the designer because it is much easier and less work. And since the ui is transformed in a header file, you have no negative impact.

  3. The following user says thank you to Lykurg for this useful post:

    kringen (30th March 2012)

  4. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Best Practice - Qt Designer or Code?

    Personal preference as Lykurg says. I use both. In my current project, I code my main window which has little content until I load a range of plugins providing more complex widgets I have built with the aid of Designer.

  5. The following user says thank you to ChrisW67 for this useful post:

    kringen (30th March 2012)

Similar Threads

  1. Replies: 80
    Last Post: 12th March 2020, 13:58
  2. [Qt Designer] How to get source code
    By Svalorzen in forum Newbie
    Replies: 4
    Last Post: 29th June 2010, 12:10
  3. Qt designer Vs Typed code
    By URPradhan in forum Newbie
    Replies: 1
    Last Post: 22nd January 2010, 11:02
  4. source code from Qt4 designer
    By freelancer.kiran in forum Qt Tools
    Replies: 2
    Last Post: 12th May 2008, 07:40
  5. Designer produces invalid code?
    By Tiansen in forum Qt Programming
    Replies: 7
    Last Post: 4th March 2008, 11:43

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.