Skip to content

How can I popup the menu again (such as a respawn)? #1

@muawijhe

Description

@muawijhe

Hi!
with respect to your examples, i.e. hexagon, I am trying to respawn the menu once the letter F is selected... however this does not happen. Any recommendation or suggestion ?

My goal is to use the menu items to select a certain configuration, and then using one of the menu entries execute a task will the parameter set.
I expect to connect the menu item signals to update the parameters, but once this happen, I need to re-show the menu in the original popup position in order to let the user to select more parameters.

I hope you can help me with this.

V.

`
// ....
subPie->insertItem("F", this, SLOT(respawn()));
// ...
public slots:
void noop()
{
qDebug() << "noop";
}

void respawn() {
    qDebug() << "respawn";
    pie->popup(oPosition);
}

signals:
void respawn(QMouseEvent *e);

protected:
QPoint oPosition;

protected:
void mousePressEvent(QMouseEvent *e)
{
oPosition = e->globalPos();
//if ( e->button() & Qt::RightButton ) {
pie->popup(oPosition);
return;
//}

    QTextEdit::mousePressEvent( e );

}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions