Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Custom widget with custom widgets in Qt Creator (Designer)
Forum Updated to NodeBB v4.3 + New Features

Custom widget with custom widgets in Qt Creator (Designer)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
6 Posts 2 Posters 921 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.
  • T Offline
    T Offline
    Texture
    wrote on last edited by Texture
    #1

    Hello all!

    I am trying to use my custom widget containing another custom widget. Creating and using separate custom widgets causes no problem (I create .so lib for plugin, put it to <QtPath>/plugins/designer/, put plugin header to ~/QtPluginHeaders and use this path with INCLUDEPATH in pro files).

    So I have created ToggleSwitch widget and respective plugin, added it into QtCreator and everything is ok.
    Now I want to create new one widget with my ToggleSwitch widget. After doing the same things (adding to QtCreator) my QtCreator app crashes (while opening *.ui file in QtCreator) with the following error:

    ./qtcreator: symbol lookup error: <QtPath/plugins/designer/libNewPlugin.so: undefined symbol: _ZN12ToggleSwitchC1EP7QWidget
    

    How could I solve this issue?
    My setup: Linux, Qt version 5.13 and QtCreator built with this Qt version.
    Thank for an answers in advance!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Texture
      wrote on last edited by
      #2

      Problem has be solved by adding ToggleSwitch source/header files to the new widget .pro file.
      So the question now: is there some more common and elegant way to do this?

      jsulmJ 1 Reply Last reply
      0
      • T Texture

        Problem has be solved by adding ToggleSwitch source/header files to the new widget .pro file.
        So the question now: is there some more common and elegant way to do this?

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Texture You can make a lib from your ToggleSwitch and link your app against it

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        T 1 Reply Last reply
        2
        • jsulmJ jsulm

          @Texture You can make a lib from your ToggleSwitch and link your app against it

          T Offline
          T Offline
          Texture
          wrote on last edited by
          #4

          @jsulm could I link ToggleSwitch lib with another custom widget to do it more "logical"?

          jsulmJ 1 Reply Last reply
          0
          • T Texture

            @jsulm could I link ToggleSwitch lib with another custom widget to do it more "logical"?

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Texture You can put several widgets into one lib.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            T 1 Reply Last reply
            2
            • jsulmJ jsulm

              @Texture You can put several widgets into one lib.

              T Offline
              T Offline
              Texture
              wrote on last edited by
              #6

              @jsulm I have not thought in this way :) Sounds good, so I will give a try, thank you. Separate linking is working well.

              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