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. Button type of functionality inside QTextEdit

Button type of functionality inside QTextEdit

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 6.3k Views
  • 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.
  • J Offline
    J Offline
    jswf
    wrote on last edited by
    #1

    I haven't been able to find anything in the forums about this, so I decided I'd give posting a discussion a shot.

    My question: Is it possible to create a button inside a QTextEdit or QPlainTextEdit widget, say with an image that has been embedded in the text?

    What I'm looking to do is to embed an image (or use a region of text) in the widget and respond to mouse events with it, i.e., hovering and clicking, and use those events to perform actions.

    Thanks for your help!

    1 Reply Last reply
    0
    • B Offline
      B Offline
      brandont
      wrote on last edited by
      #2

      Maybe look around "here?":http://doc.qt.nokia.com/latest/richtext.html

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jswf
        wrote on last edited by
        #3

        Thanks for the reply. But, unfortunately, I haven't seen anything in the documentation regarding a button like event. Any other thoughts?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          brandont
          wrote on last edited by
          #4

          Umm.... "QWebPage?":http://doc.qt.nokia.com/latest/qwebpage.html#details
          Never took a deep look at it, but I'd imagine they'd use html buttons. Theres a few hits for "button" on that page. Also, apparently it allows for text editing.

          1 Reply Last reply
          0
          • W Offline
            W Offline
            webmaster.skelton
            wrote on last edited by
            #5

            Have you tried giving the text edit a layout, and then simply adding the widget to the layout?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              maxvanceffer
              wrote on last edited by
              #6

              maybe better and more easy just move custom widget to cursor point and then simply show it ?

              1 Reply Last reply
              0

              • Login

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