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. To integrate a custom widget with Qt Designer, you require a suitable description for the widget and an appropriate project file.

To integrate a custom widget with Qt Designer, you require a suitable description for the widget and an appropriate project file.

Scheduled Pinned Locked Moved Unsolved General and Desktop
designer plugindesigner
3 Posts 2 Posters 232 Views
  • 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.
  • J Offline
    J Offline
    jdent
    wrote on 13 Mar 2024, 23:48 last edited by jdent
    #1

    Does the project file need to be a DLL or can it be an EXE? What modules should we include? How about core;gui;widgets;sql;charts;designer?

    I am using VS Tools for Qt... which project type should I create?

    Qt Designer custom widget?

    Qt Class Library?

    Qt Widgets application?

    It seems to me that the first is the correct one... am I right? don't I need to export the custom widget? in VS that would mean __declspec(dllexport) but that is not present in the generated code....?? maybe there is some macro in Qt for this.....

    P 1 Reply Last reply 14 Mar 2024, 00:05
    0
    • J jdent
      13 Mar 2024, 23:48

      Does the project file need to be a DLL or can it be an EXE? What modules should we include? How about core;gui;widgets;sql;charts;designer?

      I am using VS Tools for Qt... which project type should I create?

      Qt Designer custom widget?

      Qt Class Library?

      Qt Widgets application?

      It seems to me that the first is the correct one... am I right? don't I need to export the custom widget? in VS that would mean __declspec(dllexport) but that is not present in the generated code....?? maybe there is some macro in Qt for this.....

      P Offline
      P Offline
      Pl45m4
      wrote on 14 Mar 2024, 00:05 last edited by Pl45m4
      #2

      @jdent

      Since you took the title of this topic from here, I think you already found the documentation page about creating Qt Designer Plugins.

      How about core;gui;widgets;sql;charts;designer?

      Here is an example:

      • https://doc.qt.io/qt-6/designer-creating-custom-widgets.html#a-simple-plugin

      You also need Qt::UiPlugin

      and need to install your app to the place where your Qt Designer looks for plugins (QT_INSTALL_PLUGINS/ QT6_INSTALL_PLUGINS).

      Here you can find another simple but complete plugin example:

      • https://doc.qt.io/qt-6/qtdesigner-customwidgetplugin-example.html

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      J 1 Reply Last reply 14 Mar 2024, 00:29
      1
      • P Pl45m4
        14 Mar 2024, 00:05

        @jdent

        Since you took the title of this topic from here, I think you already found the documentation page about creating Qt Designer Plugins.

        How about core;gui;widgets;sql;charts;designer?

        Here is an example:

        • https://doc.qt.io/qt-6/designer-creating-custom-widgets.html#a-simple-plugin

        You also need Qt::UiPlugin

        and need to install your app to the place where your Qt Designer looks for plugins (QT_INSTALL_PLUGINS/ QT6_INSTALL_PLUGINS).

        Here you can find another simple but complete plugin example:

        • https://doc.qt.io/qt-6/qtdesigner-customwidgetplugin-example.html
        J Offline
        J Offline
        jdent
        wrote on 14 Mar 2024, 00:29 last edited by jdent
        #3

        @Pl45m4 only one thing: which project type should I create in Visual Studio? Qt Designer custom widget? do we need to export the widget?

        __declspec(dllexport)??

        The only problem is the examples are for use in Qt Creator I think while I am in Visual Studio... is there a VS example?
        How can I find the value of the macros like $$[QT_INSTALL_PLUGINS] and ${INSTALL_EXAMPLEDIR}?

        1 Reply Last reply
        0

        3/3

        14 Mar 2024, 00:29

        • Login

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