Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

warning QToolbar::actionTriggered is not a signal[crazy-connect-no-signal]



  • I use it as follows:

        m_toolbar = new QToolBar;
        m_toolbar->setFixedHeight(40);
        QList<QAction*> toolBarList;
        toolBarList.append(new QAction(QStringLiteral("connect")));
        toolBarList.append(new QAction(QStringLiteral("create_select")));
        toolBarList.append(new QAction(QStringLiteral("table")));
        toolBarList.append(new QAction(QStringLiteral("view")));
        toolBarList.append(new QAction(QStringLiteral("function")));
    
        m_toolbar->addActions(toolBarList);
    
        QVBoxLayout* mainlayout = new QVBoxLayout;
        mainlayout->addWidget(m_toolbar);
        mainlayout->addStretch();
        mainlayout->setSpacing(0);
        mainlayout->setContentsMargins(0, 0, 0, 0);
    
        ui->centralwidget->setLayout(mainlayout);
    
        connect(m_toolbar, &QToolBar::actionTriggered, this, &MainWindow::toolbarTriggerd);
    

    on this line connect(m_toolbar, &QToolBar::actionTriggered, this, &MainWindow::toolbarTriggerd);
    I get a warning: QToolBar::actionTriggered is not a signal [crazy-connect-no-signal]

    My system: macOS Big Sur 11.1
    Qt Creater: 4.14.2
    Qt: 6.0.2


  • Lifetime Qt Champion



  • @mrjj Maybe it‘s a bug for the Qt 6.0


Log in to reply