Reuse qcc dialog in plugin

Questions related to plugins development
Post Reply
PhilipK
Posts: 6
Joined: Tue Apr 14, 2020 12:02 pm

Reuse qcc dialog in plugin

Post by PhilipK »

Hello,

in my plugin I want to instantiate a dialog, i.e. the ccRegistrationDlg from the qcc directory.
Is this or should this be possible at all?

My steps so far in my plugin's CMakeLists.txt:

Code: Select all

...
include_directories( ${CloudCompare_SOURCE_DIR} )
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY AUTOUIC_SEARCH_PATHS ${CloudCompare_SOURCE_DIR}/ui_templates)
target_sources( ${PROJECT_NAME}
        PRIVATE
        ${CloudCompare_SOURCE_DIR}/ccRegistrationDlg.cpp
        )
...
The problem is that some symbols from the MainWindow are not found which are required by ccRegistrationDlg and thus I get a linker error. Is there a way of reusing the dialog or do I have to copy the sources to my plugin?

Thank you in advance for your help!
Best regards,
Philip
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Reuse qcc dialog in plugin

Post by daniel »

To do that, you will have to include all the files of the dialog (as you did) but probably also some of its dependencies (the uic'ed file at least). And you should also make sure that your plugin links against CCCoreLib (as I see that this dialog relies on it a lot).
Daniel, CloudCompare admin
Post Reply