Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved How to integrate Qt Designer into an external IDE

    Tools
    4
    6
    1463
    Loading More Posts
    • 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.
    • JKSH
      JKSH Moderators last edited by

      Hi all,

      I'm planning to integrate Qt Designer into an external IDE. Does anyone have experience with this? For starters, what classes/functions do I use to create an instance of Qt Designer?

      I had a quick look, and the classes at http://doc.qt.io/qt-5/qtdesigner-module.html seem mainly for extending Qt Designer itself. I also glanced through the source code for Qt Creator and the Visual Studio Add-In but nothing jumped out immediately, so I thought I'd ask before plunging into the depths of the code.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      kshegunov 1 Reply Last reply Reply Quote 1
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        Hi
        Nice project. o.O
        Can I ask if you mean the standalone "exe" of Designer
        as seen in Qt4? or the plugin version of the same
        as used in Qt Creator Qt5.ish ?
        Creator seems to be one giant plugin loader so embedding into external IDE could
        in theory be realized by loaded as plugin if other IDE is Qt based.
        I assume you already know more of Creator then I do, i'm just curious :)

        1 Reply Last reply Reply Quote 0
        • kshegunov
          kshegunov Moderators @JKSH last edited by

          @JKSH
          Hello,
          I haven't any experience with this, but I'd start with taking a look at how Qt Creator integrates it. It looks like there's a plugin for creator that instantiates QDesignerFormEditorInterface which seems, at least to me, to be the entry point for all of the designer's functionality.
          ... but as @mrjj said you probably know Qt better than most ... so I don't know how much help would we/I be.

          Kind regards.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply Reply Quote 1
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            To add to my fellows, what IDE would that be ? :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • JKSH
              JKSH Moderators last edited by

              Thanks, guys :) Qt is a massive toolkit though, and there are many things within it that I've never used before! (I've spent very little time in Qt Creator's code base, so I probably have the same amount of experience as you in this area) Anyway, it's more fun to involve the community than to tinker alone in my basement.

              It's the LabVIEW IDE, for which I'm writing language bindings for: https://lavag.org/topic/19611-utf-8-text-svg-images-inheritable-gui-components-dynamically-composed-guis-layout-management-splitters-in-tabs-mdis-taskbar-integration-and-much-more/ (I was hoping for a stronger reaction from the LabVIEW community, but this is a good start)

              LabVIEW is a (proprietary) dataflow language that I use in my day job. It's great for controlling industrial hardware, industrial comms, data acquisition, data processing, etc. You can also use it to get a GUI up and running very very quickly. However, its GUIs aren't very flexible -- this is where Qt shines.

              @mrjj said:

              Can I ask if you mean the standalone "exe" of Designer
              as seen in Qt4? or the plugin version of the same
              as used in Qt Creator Qt5.ish ?

              I'm leaning towards the plugin version, as that would enable two-way comms between the IDE and Qt Designer. The standalone .exe might be easier to implement in the short term, though (but it doesn't seem to exist in Qt 5 anymore).

              @kshegunov said:

              I'd start with taking a look at how Qt Creator integrates it. It looks like there's a plugin for creator that instantiates QDesignerFormEditorInterface which seems, at least to me, to be the entry point for all of the designer's functionality.

              Awesome; that's the perfect starting point, thanks!

              It looks like there isn't a single pre-defined widget that Qt Creator instantiates, so Creator implements its own wrapper widget to manage the different components of Qt Designer: http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/designer/editorwidget.cpp

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply Reply Quote 0
              • kshegunov
                kshegunov Moderators last edited by kshegunov

                @JKSH said:

                It looks like there isn't a single pre-defined widget that Qt Creator instantiates, so Creator implements its own wrapper widget to manage the different components of Qt Designer.

                I think this is because they want it fancy (like adding things to dock(s)). :)
                See for example:
                http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/designer/formeditorw.cpp#n231
                http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/designer/formeditorw.cpp#n368
                http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/designer/formeditorw.cpp#n455
                http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/designer/formeditorw.h

                It appears in Creator there's a wrapper in place for the designer widget and its subcomponents. I can't blame them though, because at least it puts the introspection in one place and provides a more convenient way of treating the various subwidgets.

                I do believe however that only for testing you could try embeding the top-level widget and seeing how that fares. I'd assume that it should at least show the designer. Although, while skimming through the source I wasn't able to see where they are instantiating the QDesignerFormEditor, perhaps there's a plugin-loading somewhere that I missed.

                Kind regards.

                Read and abide by the Qt Code of Conduct

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post