November 15, 2010

jswf jswf
Lab Rat
1 posts

Button type of functionality inside QTextEdit

 

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!

5 replies

November 15, 2010

brandont brandont
Lab Rat
18 posts

Maybe look around here? [doc.qt.nokia.com]

November 15, 2010

jswf jswf
Lab Rat
1 posts

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

November 15, 2010

brandont brandont
Lab Rat
18 posts

Umm…. QWebPage? [doc.qt.nokia.com]
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.

November 17, 2010

webmaster.skelton webmaster.sk..
Lab Rat
65 posts

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

November 18, 2010

maxvanceffer maxvanceffer
Lab Rat
48 posts

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

 
  ‹‹ Ribbon control      QPainter size limitations ››

You must log in to post a reply. Not a member yet? Register here!