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. Unable to figure out how to add custom widget in qt creator.
Forum Updated to NodeBB v4.3 + New Features

Unable to figure out how to add custom widget in qt creator.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 1 Posters 2.2k Views 1 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.
  • D Offline
    D Offline
    dhruvvyas
    wrote on last edited by
    #1

    Hi, all

    I've started off with qt few days ago. I've gone through basic tutorials and understood how it works basically.
    My system specs : using qt-4.8.5-minGW, qt creator 3.0 (both of 'em installed via installer) on win7

    Recently, I was going through a tutorial to create custom widget (analog clock example) in which i've gone through procedure. Project builds fine. Now what am I supposed to do so that I can use that custom widget via qt-creator to design my own ui ?

    I've gone through various posts saying use promote widget options and etc. But am i supposed to add generated files (if any) somewhere in qt-creator or qt-designer ? My ultimate aim is to show that custom widget in qt-creator's built in widget panel.

    Any help regarding his topic will be appreciated.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dhruvvyas
      wrote on last edited by
      #2

      Alright,

      I followed this link : http://qt-project.org/forums/viewthread/6235 and figured out where it should be put (generated dll file).

      I checked like mentioned in this reference. Tools --> Form editor --> Qt designer plugins

      My custom plug in is listed under failed plugin with error message saying :

      " Plugin verification data mismatch"

      Any idea what could be the error ?

      Thanks in advance.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dhruvvyas
        wrote on last edited by
        #3

        Hi,

        I figured out the problem.

        I guess it was because my qt creator was based on qt 5.2 , msvc 2010 and I was using qt 4.8.5 to compile the plugin.

        I solved it as i'm using qt creator 2.5.2 (based on qt 4.8.2) and qt-4.8.2-VS2008, and after adding generated dll to the path, it adds the widget to designer / creator panel.

        Now i'm stuck at the next stage.

        While adding a custom widget to a form, while building it says...

        "widget.h" file not found. Now that got me thinking isn't generated dll supposed to do that ?

        Anyhow i tried adding .h and source files of widget to the path but then the following error pops up.

        12:10:31: Running steps for project test1...
        12:10:31: Configuration unchanged, skipping qmake step.
        12:10:31: Starting: "C:\Qt\qtcreator-2.5.2\bin\jom.exe"
        C:\Qt\qtcreator-2.5.2\bin\jom.exe -f Makefile.Debug
        Error: dependent '....\Custom' does not exist.
        jom: D:\Qt projects\Test forms\test1-build-desktop-Qt_4_8_2__4_8_2__Debug\Makefile [debug] Error 2
        12:10:32: The process "C:\Qt\qtcreator-2.5.2\bin\jom.exe" exited with code 2.
        Error while building/deploying project test1 (target: Desktop)
        When executing step 'Make'

        Any help will be appreciated.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dhruvvyas
          wrote on last edited by
          #4

          I figured it out. I have to copy my .h files and source files in project path. It worked.

          Thanks.

          1 Reply Last reply
          0

          • Login

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