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. Embed QWinget into QPlainTextEdit

Embed QWinget into QPlainTextEdit

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 280 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.
  • X Offline
    X Offline
    Xanx
    wrote on last edited by
    #1

    Hello!
    I am trying to make an app with powerful editor. I want the editor to be interactive, so that the user is able to interact with it not only by typing a text, but also by interaction with controls, embedded into the editor.
    On the other words, I want to embed, say, a button into the editor that the user is able to click on. More generally, I want to embed a QWidget that is accessible by the user.
    I have found that I possibly can use QAbstractTextDocumentLayout in order to make my own documents layout and show the QWidget (but I’m still not sure I can enable user interaction with the control). I do not like this solution, because I’m afraid it requires too many work to do, to add a simple QWidget.
    Another solution is QTextObjectInterface that seem to be intended to embed objects into text. I’ve found a demo here, but it shows hot to embed a picture. And I’m not sure it works with QWidget.
    Have anyone tried to do that? Maybe there is a better solution?

    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