Important: Please read the Qt Code of Conduct -

How to use FancyTabWidget class

  • I was trying to make my own sub class of QTabWidget when I realized my goal was very close to the FancyTabWidget class, used in QtCreator in the left tabbar.


    • am I allowed to use it in my own application?
    • what's the recommended way to use it? Compile the whole plugin and use it as a library (including the headers and linking the dll) or import the source files into the project and deal with all the nested dependencies and adapt the code so it can compile as a standard class rather than a library?

  • Lifetime Qt Champion


    AFAIK, Qt Creator is GPLv3 so if it fits your use case, then yes you can use it.

  • Thanks. I compiled the plugin (minGW and Qt5.11.0) and linked the Core4.dll library. In my code I try to create an instance:

    #include "fancytabwidget.h"
    // ...
        Core::Internal::FancyTabWidget *w;
    // ...
        w = new Core::Internal::FancyTabWidget(this);

    I got the following error:

    F:\MyProject\mainwindow.cpp:7: error: undefined reference to `Core::Internal::FancyTabWidget::FancyTabWidget(QWidget*)'

    Here the lines in my pro file:

    INCLUDEPATH += "D:/qt-creator-master/src/plugins/coreplugin/"
    LIBS += -L"D:/build-qtcreator-Desktop_Qt_5_11_0_MinGW_32bit-Release/lib/qtcreator/plugins" -lCore4

  • Lifetime Qt Champion

    This is a plugin, it doesn't export any specialise symbol. It might be easier to integrate the code directly into your project.

Log in to reply