Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to capture a double click event on a QPlainTextEdit using signal and slot?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gjiang
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kenchan
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved