Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Core::EditorManager *em = Core::EditorManager::instance();
Core::EditorManagerPlaceHolder *emph = static_cast<Core::EditorManagerPlaceHolder* >(em->parent());
QFrame backgroundFrame = new QFrame(emph);
emph->layout()->addWidget(backgroundFrame);
#include <coreplugin/editormanager/editormanager.h>
QWidget *coreWidget = Core::ICore::mainWindow(); //получаем указатель на главный виджет QtCreator
QMainWindow *mainWindow = qobject_cast<QMainWindow *>(coreWidget); //преобразуем в QMainWindow
//далее добавляем ToolBar как к обычному QMainWindow
QToolBar * fileToolBar = new QToolBar(QString::fromUtf8("Tools"));
mainWindow->addToolBar(fileToolBar);
QList<Core::Command *> commandsList = Core::ActionManager::commands();
for (int i = 0 ; i < commandsList.count() ; i++)
{
if (commandsList.at(i)->action()) //не у всех Command есть свой QAction
{
qDebug() << QString::fromUtf8("Action: ")
<< commandsList.at(i)->action()->text()
<< QString::fromUtf8( "Description: ")
<< commandsList.at(i)->description();
}
}






tabsforeditorswidget.cpp:6:36: fatal error: texteditor/itexteditor.h: Нет такого файла или каталога
Плагин, добавляющий табы в QtCreator