-1

I want to know which way is efficient if I am having number of UI forms. I don have any idea about memory utilization in both of case I just tried both ways in a simple example.

http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html here they described both ways. Now which one method is more efficient?

QT-ITK-VTK-Help
  • 548
  • 2
  • 6
  • 19
  • I have posted same question again and I got right response there I couldn't delete this post btw. http://stackoverflow.com/questions/16892944/ui-forms-add-runtime-or-compile-time – QT-ITK-VTK-Help Jun 17 '13 at 09:47

2 Answers2

1
I want to know which way is efficient if I am having number of UI forms

Take a look at this thread: Hand Coded GUI Versus Qt Designer GUI (Hand Coded GUI Versus Qt Designer GUI)

I don have any idea about memory utilization in both of case

This is the same in both cases. Apart from that you don't need to care of it if your class is derived from QObject.

Community
  • 1
  • 1
Leo Chapiro
  • 13,678
  • 8
  • 61
  • 92
0

UI files are just a simpler way to generate more Qt correct layouts. It's also much easier to work with designer than to hand code your UI and designer allows for previewing your changes so no generation and compilation needed in most cases. Also, designer allows you to insert your custom widgets using the "Promote to..." option in the context menu for each widget.

The net result of designer code may look messier but it's exactly the same as you manually laying out and is much less prone to error.

cppguy
  • 3,611
  • 2
  • 21
  • 36