ctkDateRangeWidget not available on Qt Designer

, ,

When editing a custom extension UI on Qt Designer using the “Edit UI” button in the Developer Section, ctkDateRangeWidget is not available. It’s still available through python with ctk.ctkDateRangeWidget(). Is there a way to import ctkDateRangeWidget and directly add it to the .ui file?

ctkDateRangeWidget just does not have a designer plugin. To fix it, two files has to be added to CTK (in CTK\Libs\Widgets\Plugins) and add the class to CMakeLists.txt and ctkWidgetsPlugins.h. It would be great if you could submit a pull request with this change to CTK. You may not even need to build it, we can test it before we merge the pull request.

In the meantime, as a workaround, you can add a frame in Qt designer and then put the ctkDateRangeWidget in the frame in your Python code.

1 Like