View Poll Results: Do you use the designer for your gui?

Voters
662. You may not vote on this poll
  • Always. I almost don't know how to layout widgets manually.

    193 29.15%
  • Designer? What is that? Nope, never use it.

    111 16.77%
  • Depends and the task. Sometimes yes, sometimes no.

    358 54.08%
Page 1 of 2 12 LastLast
Results 1 to 20 of 81

Thread: Do you use the designer, or do you code your gui manually?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Do you use the designer, or do you code your gui manually?

    Just for pure curiosity.
    Who is using the designer. Why? Why not? Always?
    Last edited by Kumosan; 1st April 2007 at 22:45. Reason: Typo No. 1

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    Similar polls from the past, just for reference:
    http://www.qtcentre.org/forum/f-qt-p...hand-3099.html
    http://www.qtcentre.org/forum/f-qt-p...hand-5936.html

    and, yes, I do use Qt Designer all the time.

  3. #3
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: Do you use the designer, or do you code your gui manually?

    Hmm, a third might be a bit much. Perhaps this thread should be deleted.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by Kumosan View Post
    Hmm, a third might be a bit much. Perhaps this thread should be deleted.
    I don't know, compare the results of previous polls --- they're contradictory.

  5. #5
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: Do you use the designer, or do you code your gui manually?

    Depends probably on the exact wording of the poll questions. But it is strange.

  6. #6
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    I use the Designer. I avoided it in Qt3, but changed my mind in Qt4. The Qt3 Designer created widgets, which meant I was always subclassing an autogenerated class. But with the new UI form classes this is not a problem. I can treat the UI as a true object, and use it the way I want to use it. I typically use the UI as a private data member, but sometimes use multiple inheritance instead. The second problem with Qt3 was that it generated "messy" code (imho). But Qt4 Designer generates very clean sensible code.

    I did have one GUI a couple of months ago that was too complicated for Designer. I needed to use a couple of custom layout managers in it, and some "hand tweaking", to make lay it out correctly. But that's the exception.

    I don't put everything in a single UI file, though. I tend to split it up. The main window, menus and toolbars will be one UI file, and the central widget antoher UI file. If I have a tabbed widget, then every page will be a separate UI file. Etc.

    Designer has proven to be a huge timesaver.

  7. #7
    Join Date
    Jan 2006
    Location
    Netherlands
    Posts
    56
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    I always use the designer to design my GUI's, but only the layout.... for functionality i use the subclassing method with Visual Studio 6 as IDE.
    ..:: Still Standing Strong ::..

  8. #8
    Join Date
    Nov 2008
    Posts
    142
    Thanks
    3
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    I mostly used the designer with KDevelop3. I'm still not exactly sure what is the right way to use it (or, the preferred way) I've been creating Qt apps with KDevelop, as well as with Eclipse. As I understand it, the first encourages subclassing, the latter encourages using the UI as a member. Now I'd like to know what most of the users of Qt prefer....

  9. #9
    Join Date
    Jul 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Do you use the designer, or do you code your gui manually?

    I use the designer for simple dialogs only.

    The feature I would really need is being able to put a _subclassed_ widget onto the form. If there is already such a functionality, I don't know how to use it... What I can do is to use the Qt provided widgets only, but usually I'd like to work with eg. MyTabWidget instead of QTabWidget. I'd welcome Visual Studio's convenient solution in the designer for this issue.

  10. #10
    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: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by lenardpi View Post
    The feature I would really need is being able to put a _subclassed_ widget onto the form. If there is already such a functionality, I don't know how to use it... What I can do is to use the Qt provided widgets only, but usually I'd like to work with eg. MyTabWidget instead of QTabWidget.
    Yes, it's possible. See Promoting Widgets for more details.
    J-P Nurmi

  11. The following user says thank you to jpn for this useful post:

    Ashkan_s (19th September 2012)

  12. #11
    Join Date
    Feb 2007
    Posts
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    Depends, In some cases, I do them within the program, usually this is in the case where the elements in the dialog my change dynamically. Otherwise, the designer is my friend.

  13. #12
    Join Date
    Feb 2006
    Location
    USA
    Posts
    142
    Thanks
    24
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Do you use the designer, or do you code your gui manually?

    I use designer when it's convenient. Some things, like toolbars and such, must be done programmatically (designer has no such functionality in v4), but I don't complain too much there - it's a simple matter. Other things, like truly dynamic menuing systems, obviously cannot be done through designer due to their dynamic nature (for example, a list of pushbuttons that gets populated based on what plugins the user has loaded).

    Some things are possible to do in designer, but are very awkward. For example, creating a widget to insert into a bunch of other widgets (re-using functionality). Designer provides this functionality, but you must manually edit the .ui file to properly include it. Much easier to just design the thing via code, though you can of course design the shared portion using designer rather easily.

    Of course, most simple widgets and dialogs benefit greatly from designer - being able to see exactly how everything gets placed, how certain modifications look in real-time, etc - it's a valuable resource.
    Life without passion is death in disguise

  14. #13
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Do you use the designer, or do you code your gui manually?

    I use Designer if Designer can do what I want. But I find it extremely limited.

    If I want a combobox in a toolbar, for example, I'm out of luck. Or if I want to assign a QIcon with different states to an action, instead of a single image. Or if I want to lay-out the status-bar. Or if I want to set my own central widget.

    The code would be a lot cleaner if you could do more in Designer.
    Last edited by Michiel; 21st May 2007 at 12:58.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

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

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by Michiel View Post
    If I want a combobox in a toolbar, for example, I'm out of luck.
    True, but this is quite easily implementable, so it's highly probable we'll have access to QWidgetAction objects from Designer.
    Or if I want to assign a QIcon with different states to an action, instead of a single image.
    I think this one is possible to do with current Designer, but I'd have to check how it assigns icons to widgets.
    Or if I want to lay-out the status-bar.
    True, but this is easily doable by combining two Designer generated widgets and not more than five lines of code.

    Or if I want to set my own central widget.
    Hmm... This one you certainly can do within Designer, especially with the help of custom widgets.

    The code would be a lot cleaner if you could do more in Designer.
    True, but it'd start to get difficult to use the tool.

  16. #15
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by wysota View Post
    I think this one is possible to do with current Designer, but I'd have to check how it assigns icons to widgets.
    Looks to me like you can only select one file or one resource.

    True, but this is easily doable by combining two Designer generated widgets and not more than five lines of code.
    Hm.. Could you explain this? Right now I do it with only 4 lines of code, without using designer.

    Hmm... This one you certainly can do within Designer, especially with the help of custom widgets.
    In Designer, the central widget is a QWidget, which is the parent of my real main widget. This is all in Designer, but it's a bit of a waste to have a QWidget that doesn't really do anything.

    Or I can use the setCentralWidget() function in the code. This costs extra lines of code to create the widget, set its properties and make it the central widget.

    True, but it'd start to get difficult to use the tool.
    True, but I don't think we're at that point yet. Right now, many more features could be added without sacrificing simplicity.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

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

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by Michiel View Post
    Looks to me like you can only select one file or one resource.
    There are other ways to assign pixmaps.

    Hm.. Could you explain this? Right now I do it with only 4 lines of code, without using designer.
    You can certainly implement your statusBar widget in Designer and then just assign it to the status bar using code. There is also a high chance you could use QStatusBar as the base for your form in Designer and then just replace the default bar with yours with a single line of code. If not, then it's just a matter of subclassing QStatusBar to introduce proper functionality.

    In Designer, the central widget is a QWidget, which is the parent of my real main widget. This is all in Designer, but it's a bit of a waste to have a QWidget that doesn't really do anything.
    That's not much of a waste, isn't it? I'm sure you can spare extra 100 bytes of memory. It's just a pitty you can't promote the default central widget to the proper widget. But maybe that's a suggestion for Trolltech to do it. Should take them not more than 15 minutes to do that.

    True, but I don't think we're at that point yet. Right now, many more features could be added without sacrificing simplicity.
    I'm sure there are features in Designer which you have not discovered yet

    Edit: I just checked and confirmed it's possible to assign whatever icons you want from within Designer.
    Last edited by wysota; 21st May 2007 at 14:10.

  18. #17
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by wysota View Post
    You can certainly implement your statusBar widget in Designer and then just assign it to the status bar using code. There is also a high chance you could use QStatusBar as the base for your form in Designer and then just replace the default bar with yours with a single line of code. If not, then it's just a matter of subclassing QStatusBar to introduce proper functionality.
    Too much trouble. Right now, I only have two QLabels inside the statusbar. And I only require 4 lines of code (6 if you include the member var declarations) to put them there. I simply think you should be able to drag them (and maybe progressbars, etc.) to the statusbar in Designer.

    That's not much of a waste, isn't it? I'm sure you can spare extra 100 bytes of memory. It's just a pitty you can't promote the default central widget to the proper widget. But maybe that's a suggestion for Trolltech to do it. Should take them not more than 15 minutes to do that.
    You're right, it's not much of a waste. And I'll sacrifice those 100 bytes to be able to do as much as possible in Designer. I simply think that you should be able to remove any unnecessary layers of code. As you say, it's probably not hard to implement this one.

    I'm sure there are features in Designer which you have not discovered yet
    I don't think so. Don't misunderstand. I love Designer. It's clean, easy to use and elegant. But there are improvements to be made. You can't take full advantage of the features of Qt 4 in Designer.

    Edit: I just checked and confirmed it's possible to assign whatever icons you want from within Designer.
    Well, don't keep it to yourself. How do I assign a QIcon (with different sizes + enabled/disabled states) to a QAction from within Designer?
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

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

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by Michiel View Post
    Well, don't keep it to yourself. How do I assign a QIcon (with different sizes + enabled/disabled states) to a QAction from within Designer?
    You use the "pixmap function" feature of Designer.

    BTW. I don't say Designer is perfect. See the posts about UIC and container plugins on my blog.

  20. #19
    Join Date
    Jun 2007
    Posts
    19
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    I use Designer for QMainWindow and QDialogs. I find it handy to get the layout right, especially when I want to stretch "correctly", whatever that is depending on the dialog. It helps to connect simple signals/slots such as pressing enter in a text edit box to activate the Apply button. It makes it very easy to write code with the automatic slot naming, such as on_QSpinBox_valueChanged(int ID).

    The times I write code are when the contents change.. such as a joystick dialog where it loads sliders for each available axis, and buttons for each available button. A library handles most of the work and gives me counts for each.

  21. #20
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Do you use the designer, or do you code your gui manually?

    Quote Originally Posted by wysota View Post
    You use the "pixmap function" feature of Designer
    What is the pixmap function and how do I use it? I've been writing most of my interface code by hand since I need to assign icons containing multiple pixmap sizes to QActions , but if it was possible to do in designer I would switch.

Similar Threads

  1. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  2. Replies: 13
    Last Post: 15th December 2006, 11:52
  3. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 00:49
  4. Where is code file
    By safknw in forum Qt Tools
    Replies: 21
    Last Post: 20th June 2006, 10:08

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.