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. QT Designer Plugin Development
QtWS25 Last Chance

QT Designer Plugin Development

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt designerpluginwidget
2 Posts 2 Posters 878 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.
  • I Offline
    I Offline
    Ice13
    wrote on 12 Apr 2018, 11:52 last edited by
    #1

    Hi

    At first i have to say, that i'm completly new in QT, so that i have to learn a lot.

    My task/target is to create an custom widget plugin for the QT Designer and deliver it to some other developers.
    The Widget works fine, if i use it in the same Project, where i created it.
    My next step was to pack the widget into an library (dll) to add it to the QT Designer Toolbar.
    I implemented the QDesignerCustomWidgetInterface class, built the library and copied it to the designer folder, so that the widget appears in the Toolbox/Widget-list. Works fine.

    But here i'm stuck and i have no idea how to solve it:
    How can i use this custom widget in an simple MainWindow application?
    If i simply add the Widget to my ui file (MainWindow), everything is shown correctly in the designer.
    But if i compile the MainWindow Project, i get this message from the generated "u_.h" file:
    error C1083: Cannot open include file: '
    .h'

    The application is missing the header files. If i add them to the Project, then i get some LNK2019 errors (unresolved external Symbol "...")

    I can't publish my Code here, but it would help me a lot, if you could explain it to me for the following plugin and an empty MainWindow template, where i have the same problem:

    http://doc.qt.io/qt-5/qtdesigner-worldtimeclockplugin-example.html (files at the end of the site)

    I thank you in advance

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 12 Apr 2018, 18:21 last edited by
      #2

      Hi
      the include in the ui_ comes from
      QString WorldTimeClockPlugin::includeFile() const
      {
      return QStringLiteral("worldtimeclock.h");
      }

      but it seems the error contains no filename ??

      1 Reply Last reply
      0

      2/2

      12 Apr 2018, 18:21

      • Login

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