Skip to content

CornerButton example bug - error on touchscreen #3

Description

@poltpolt

When using a touchscreen all works fine if I pick any of the 2 actions added.

But if I open the BurgerMenu popup ,then decide that I don't want to choose any of the actions in the CornerButton so I click elsewhere in the app or click the CornerButton again to close the popup . Then touchscreen stops working in the app at all.

interestingly enough this mod I have made (being a beginner), works :

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    button = BurgerButton::addButtonToCorner(this);
    auto action = new QAction("About KDAB", this);
    this->addAction(action);

    action = new QAction("Help", this);
    this->addAction(action);
    contextMenu.addAction(action);
    connect(button,&BurgerButton::clicked,this, &MainWindow::myAction);
}

void MainWindow::myAction()
{
    qDebug()<<"myAction";
    QPoint globalPos = button->mapToGlobal(button->rect().bottomLeft());
    QAction* selectedAction = contextMenu.exec(globalPos);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions