How to capture a double click event on a QPlainTextEdit using signal and slot?



  • I want to perform a text search operation when user double click a text in my QPlainTextEdit, but I can't find the doubleClicked signal in QPlainTextEdit class?
    I seem someone mentioned using installEventFilter. I haven't tried that yet, and I prefer using signal and slot. Does anyone know how to do it?

    Thanks in advance.



  • Hi @gjiang
    The QPlainTextEdit is a QWiget. A QWidget has a double click event...

    void QWidget::mouseDoubleClickEvent(QMouseEvent *event)
    

    see the docs here maybe this will help.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.