У меня есть класс ArrayToolBar
, который имеет открытый член commandBox
и открытую функцию createArray()
.
class ArrayToolBar : public QToolBar
{
Q_OBJECT
public:
explicit ArrayToolBar(const QString &title, QWidget *parent);
CommandBox* commandBox = new CommandBox();
void createArray();
Вот как определяется createArray()
void ArrayToolBar::createArray(){
commandBox->setFocus();
connect(commandBox, SIGNAL(returnPressed()), this, SLOT(commandBox->SubmitCommand()));
}
SubmitCommand () - это открытый слот в классе CommandBox
.
Моя проблема в том, что я получаю ошибку: такого слота не существует.Это потому, что я использовал слот какого-то другого класса в ArrayToolBar
?Есть ли способ обойти?