Code/Framework/AzQtComponents

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
monroegm-disable-blank-issue-2
Esteban Papp 5 years ago
parent 657853c093
commit fbbcdfd3ca

@ -146,7 +146,7 @@ AzQtComponents::SpinBox::setHasError(doubleSpinBox, true);
{
QAction* action = new QAction("Up", this);
action->setShortcut(QKeySequence(Qt::Key_Up));
connect(action, &QAction::triggered, [this]()
connect(action, &QAction::triggered, []()
{
qDebug() << "Up pressed";
});
@ -155,7 +155,7 @@ AzQtComponents::SpinBox::setHasError(doubleSpinBox, true);
{
QAction* action = new QAction("Down", this);
action->setShortcut(QKeySequence(Qt::Key_Down));
connect(action, &QAction::triggered, [this]()
connect(action, &QAction::triggered, []()
{
qDebug() << "Down pressed";
});
@ -171,7 +171,7 @@ template <typename SpinBoxType, typename ValueType>
void SpinBoxPage::track(SpinBoxType* spinBox)
{
// connect to changes in the spinboxes and listen for the undo state
QObject::connect(spinBox, &SpinBoxType::valueChangeBegan, this, [this, spinBox]() {
QObject::connect(spinBox, &SpinBoxType::valueChangeBegan, this, [spinBox]() {
ValueType oldValue = spinBox->value();
spinBox->setProperty("OldValue", oldValue);
});

@ -36,17 +36,17 @@ TabWidgetPage::TabWidgetPage(QWidget* parent)
menu->addAction("Action 4 (No-op)");
actionMenu->setMenu(menu);
connect(action1, &QAction::triggered, this, [this]() {
connect(action1, &QAction::triggered, this, []() {
QMessageBox messageBox({}, "Action 1 triggered", "Action 1 has been triggered", QMessageBox::Ok);
messageBox.exec();
});
connect(action2, &QAction::triggered, this, [this]() {
connect(action2, &QAction::triggered, this, []() {
QMessageBox messageBox({}, "Action 2 triggered", "Action 2 has been triggered", QMessageBox::Ok);
messageBox.exec();
});
connect(action3, &QAction::triggered, this, [this]() {
connect(action3, &QAction::triggered, this, []() {
QMessageBox messageBox({}, "Action 3 triggered", "Action 3 has been triggered", QMessageBox::Ok);
messageBox.exec();
});

Loading…
Cancel
Save