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. Qt popup menue in QPlainTextEdit
Forum Updated to NodeBB v4.3 + New Features

Qt popup menue in QPlainTextEdit

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 573 Views 2 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.
  • AmrCoderA Offline
    AmrCoderA Offline
    AmrCoder
    wrote on last edited by AmrCoder
    #1

    I have a QPlaintTextEdit and what I'm trying to do is when I press on some words in it appear something like this menu that appears when I press on function or variable in Qt IDE as an example
    alt text
    but I don't know even its name or what I should search for so if there is any hint or code can I use to do this
    all my text in the plain text Edit will be in red I want to specify a description to each word and make this menu appear when pointing on it
    Update
    when I do more search I found it and support by Qt called QToolTip it can be created on any Qt widget but how to use it inside QPlaintTextEdit or QTextEdit on words? any help or idea for that
    Thanks in Advance

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You'd likely need to implement the mouseMoveEvent function and check whether there's something under the cursor but only do the check if the mouse hasn't move after a defined time otherwise you'll likely just lose processing time for nothing.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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