sintegrial / Qt5ExtLib

Legacy Qt Solutions + latest updates for Qt 5.x
15 stars 14 forks source link

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

Open muawijhe opened 5 years ago

muawijhe commented 5 years ago

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 );

}

`

sintegrial commented 1 year ago

hi sorry, we do not own the sources - it is just a compilation of qt solutions. what is not working? popping up the menu? or action after pressing on F letter?