Page 1 of 1

Reuse qcc dialog in plugin

Posted: Wed Aug 24, 2022 2:19 pm
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

Re: Reuse qcc dialog in plugin

Posted: Thu Sep 01, 2022 9:44 pm
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).