We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect signal and slots for itemType = "action"?
There's an action like:
{ "itemType": "action", "type": "instantPopup", "name": "actionExit" }
But when I find actionExit that it occurs and nullptr.
Example:
QToolButton *actionExit = (QToolButton *)ttb["actionExit"]; if (actionExit != nullptr) { QObject::connect(actionExit, &QToolButton::triggered, this, &CMainWindow::actionExit); } else { cout << "Error: actionExit is null" << endl; }
output:
"Error: actionExit is null".
I replaced QToolButton* to QAction*, but it doesn't work.
Or it goes:
QToolButton *actionExit = (QToolButton *)ttb["actionExit"]; QObject::connect(actionExit, &QToolButton::triggered, this, &CMainWindow::actionExit);
or
QAction *actionOpen = (QAction *)ttb["actionOpen"]; QObject::connect(actionOpen, &QAction::triggered, [tabToolbar, this]() { QMessageBox::information(this, "OK", "OK"); });
They all output:
QObject::connect(QAction, Unknown): invalid nullptr parameter
please help me
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How to connect signal and slots for itemType = "action"?
There's an action like:
But when I find actionExit that it occurs and nullptr.
Example:
output:
I replaced QToolButton* to QAction*, but it doesn't work.
Or it goes:
or
They all output:
please help me
The text was updated successfully, but these errors were encountered: