Button type of functionality inside QTextEdit
-
wrote on 14 Nov 2010, 23:52 last edited by
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!
-
wrote on 15 Nov 2010, 01:23 last edited by
Maybe look around "here?":http://doc.qt.nokia.com/latest/richtext.html
-
wrote on 15 Nov 2010, 02:11 last edited by
Thanks for the reply. But, unfortunately, I haven't seen anything in the documentation regarding a button like event. Any other thoughts?
-
wrote on 15 Nov 2010, 21:37 last edited by
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. -
wrote on 17 Nov 2010, 20:58 last edited by
Have you tried giving the text edit a layout, and then simply adding the widget to the layout?
-
wrote on 18 Nov 2010, 11:29 last edited by
maybe better and more easy just move custom widget to cursor point and then simply show it ?
1/6