Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QtCreator plugin compilation error — invalid use of incomplete type 'class QAAction'
I am trying to compile (against qt 5.4.2) and I keep getting this error. Is there a version mismatch?
I am frankly a bit surprised by how hard it is to install a plugin in QtCreator. I need to find the QtCreator source, plug-in source, point paths and everything (more difficult if you don't have admin and has to download everything by yourself) to the right version, compile myself, and install. While in many IDEs it's just a few mouse clicks. am I not doing this right?
The plugin I am trying to install is this, in case anybody wonders:
../qtcreator-tabbededitor-plugin/tabsforeditorswidget.cpp: In constructor 'TabbedEditor::Internal::TabsForEditorsWidget::TabsForEditorsWidget(QWidget*)': ../qtcreator-tabbededitor-plugin/tabsforeditorswidget.cpp:54:73: error: invalid use of incomplete type 'class QAction' QAction *prevTabAction = new QAction(tr("Switch to previous tab"), this); ^ In file included from ../../../username/bin/Qt5.4.2/5.4/gcc_64/include/QtWidgets/QWidget:1:0, from ../qtcreator-tabbededitor-plugin/tabsforeditorswidget.h:5, from ../qtcreator-tabbededitor-plugin/tabsforeditorswidget.cpp:1: ../../../username/bin/Qt5.4.2/5.4/gcc_64/include/QtWidgets/qwidget.h:61:7: error: forward declaration of 'class QAction' class QAction;
VRonin last edited by
in tabsforeditorswidget.cpp add
Thanks, now I am getting errors like
cannot find -lCore
cannot find -lTextEditor
cannot find -lAggregation
cannot find -lExtensionSystem
cannot find -lUtils
Where can I obtain those libraries?
VRonin last edited by VRonin
in your .pro file, do you have
QT += core gui widgets?
Added it and still failed.
# Qt Creator linking QTC_PLUGIN_NAME = TabbedEditor QTC_LIB_DEPENDS += \ extensionsystem \ utils QTC_PLUGIN_DEPENDS += \ coreplugin \ texteditor QT += core gui widgets ## set the QTC_SOURCE environment variable to override the setting here QTCREATOR_SOURCES = $$(QTC_SOURCE) isEmpty(QTCREATOR_SOURCES):error("Error. QTC_SOURCE variable must point to Qt Creator sources.") ## set the QTC_BUILD environment variable to override the setting here IDE_BUILD_TREE = $$(QTC_BUILD) isEmpty(IDE_BUILD_TREE):error("Error. QTC_BUILD variable must point to Qt Creator build directory.") include($$QTCREATOR_SOURCES/src/qtcreatorplugin.pri) ## uncomment to build plugin into user config directory ## <localappdata>/plugins/<ideversion> ## where <localappdata> is e.g. ## "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later ## "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux ## "~/Library/Application Support/QtProject/Qt Creator" on Mac # USE_USER_DESTDIR = yes DEFINES += TABBEDEDITOR_LIBRARY # TabbedEditor files SOURCES += \ tabbededitorplugin.cpp \ tabsforeditorswidget.cpp HEADERS += \ tabbededitorplugin.h \ tabbededitorconstants.h \ tabsforeditorswidget.h RESOURCES += \ resources/res.qrc CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
QT += core gui widgets