Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is there difference between WYSIWYG editor and code to get UI file
Forum Updated to NodeBB v4.3 + New Features

Is there difference between WYSIWYG editor and code to get UI file

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 552 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Thank You
    wrote on 23 May 2021, 05:15 last edited by
    #1

    I mostly like to use wysiwyg editor as I like it's simplicity. Later it gets converted to
    ui_filename.h which is almost same as of coding

    Are there benefits of using code over the editor??
    Please share on following things
    Performance
    Maintainibility
    Easy

    and the signals and slots
    custom signal and slots take more time to manage and the code becomes too long.
    Whereas when I use "Go to slot " it manages automatically.
    So overall which one is best "WYSIWYG" or "CODE"

    Let's make QT free or It will go forever

    TRUE AND FALSE <3

    J S 2 Replies Last reply 23 May 2021, 06:58
    0
    • T Thank You
      23 May 2021, 05:15

      I mostly like to use wysiwyg editor as I like it's simplicity. Later it gets converted to
      ui_filename.h which is almost same as of coding

      Are there benefits of using code over the editor??
      Please share on following things
      Performance
      Maintainibility
      Easy

      and the signals and slots
      custom signal and slots take more time to manage and the code becomes too long.
      Whereas when I use "Go to slot " it manages automatically.
      So overall which one is best "WYSIWYG" or "CODE"

      J Offline
      J Offline
      JonB
      wrote on 23 May 2021, 06:58 last edited by JonB
      #2

      @Thank-You
      As you say, the designer saves a .ui file from what you design. Then when you build it runs a uic process to read that .ui and produce C++ code in a .h file. So using the editor ends up producing code, it's just that it's done for you.

      The Designer is nice if you like that way of seeing what you have as you design. But it only does a tiny subset of what you can do in code. Sooner or later you have to write your own code to do more than Designer produces for you.

      I would use the designer for static forms. It doesn't help you at all if you want to create widgets dynamically at runtime, or if you want to change their style/appearance/behaviour while the code is running. I would suggest not bothering at all with its signal/slot support. That doesn't do much, and gets confusing. To use Qt effectively, you need to understand how to write & connect signals & slots anyway, so you might as well get used to that. I do not share your opinion that "custom signal and slots take more time to manage and the code becomes too long.". All the Designer produces is a single connect().

      1 Reply Last reply
      2
      • T Thank You
        23 May 2021, 05:15

        I mostly like to use wysiwyg editor as I like it's simplicity. Later it gets converted to
        ui_filename.h which is almost same as of coding

        Are there benefits of using code over the editor??
        Please share on following things
        Performance
        Maintainibility
        Easy

        and the signals and slots
        custom signal and slots take more time to manage and the code becomes too long.
        Whereas when I use "Go to slot " it manages automatically.
        So overall which one is best "WYSIWYG" or "CODE"

        S Offline
        S Offline
        sierdzio
        Moderators
        wrote on 23 May 2021, 07:12 last edited by
        #3

        @Thank-You said in Is there difference between WYSIWYG editor and code to get UI file:

        Are there benefits of using code over the editor??
        Please share on following things
        Performance

        You loose a tiny amount of time for .ui -> .h conversion. This happens once, during project compilation only. At runtime there is no performance difference.

        Maintainibility

        This is up to personal preference.

        In QtWidgets, I usually use the .ui files and the editor. It is easy to maintain except for refactoring which often gets tricky.

        In QtQuick, I prefer raw .qml files. But it's all up to you (and your team, if it is a bigger project).

        Easy

        Editor wins here.

        and the signals and slots
        custom signal and slots take more time to manage and the code becomes too long.

        Well, you still have to manage this code later :-) But yes, it is very convenient to have a generator like this.

        So overall which one is best "WYSIWYG" or "CODE"

        I don't think there is a clear winner. Everybody has different preferences and different projects have different needs.

        (Z(:^

        1 Reply Last reply
        2
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 23 May 2021, 09:26 last edited by
          #4

          Hi
          Disclaimer: Im a diehard WYSIWYG lover..

          Performance

          well, UI files become code so runtime there is no performance difference.
          Compiles, it does take time - but seems very minor compared to the actual c++ compile.

          Maintainibility

          Well UI files are easier to change for people not normally involved in the user interface and
          personally, it's also easier when you come back to a project after some time.
          For a complex interface, it's vastly faster to gain an overview of what layout is inside what layout just looking at the UI tree then browse through pages of code. For a simple layout, it doesn't matter so much as the amount of code is small.

          Easy

          Even my colleagues that never do HMI can add a button by dragging it from the left.
          I doubt it would come as easy if they have to actually read and understand the code.

          Whereas when I use "Go to slot " it manages automatically.

          Well, this feature is handy but also a bit dangerous as a rename of function or the widget will break the connection for good. Also turned out that doing the connects in the
          constructor allowed quite easy to jump to a function as its then quite clear which button/widget goes where.

          1 Reply Last reply
          3
          • T Offline
            T Offline
            Thank You
            wrote on 23 May 2021, 10:15 last edited by Thank You
            #5

            Thank you everyone for your words. Then I can stick with WYSIWYG editor for small and static software.
            Everyone's answer is super best
            I will mark it as solved
            Learned lots ❤💖😃

            Let's make QT free or It will go forever

            TRUE AND FALSE <3

            1 Reply Last reply
            0

            1/5

            23 May 2021, 05:15

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved