Results 1 to 3 of 3

Thread: QAbstractTextDocumentLayout reimplementation

  1. #1
    Join Date
    May 2015
    Posts
    21
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QAbstractTextDocumentLayout reimplementation

    Can anyone help me with QAbstractTextDocumentLayout reimplementation. I can not find usable examples for reimplementation of draw, drawInlineObject and positionInlineObject functions?
    For now I have managed to register my own handler and to insert my own items handled with it, but now I nead to draw some text and shapes inline with existing text in blocks, depending on block formating (Not to insert my items but to add text and shapes if text in block have desired formating).
    Some help PLEASE.

  2. #2
    Join Date
    May 2015
    Posts
    21
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QAbstractTextDocumentLayout reimplementation

    Quote Originally Posted by 'milimoj View Post
    Can anyone help me with QAbstractTextDocumentLayout reimplementation. I can not find usable examples for reimplementation of draw, drawInlineObject and positionInlineObject functions?
    For now I have managed to register my own handler and to insert my own items handled with it, but now I nead to draw some text and shapes inline with existing text in blocks, depending on block formating (Not to insert my items but to add text and shapes if text in block have desired formating).
    Some help PLEASE.
    I must correct my self. I wish to draw some letters outside the text blocks, not inline, (for examle on the left margin of text block) and positioned on the vertical middle of the text block. As my pages are not static that letter must "follow" block when it is moved and must refresh when text/letter style of block is changed. For this I suppose that I must reimplement draw() function but I am not sure what is the right way to do it.

  3. #3
    Join Date
    May 2015
    Posts
    21
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QAbstractTextDocumentLayout reimplementation

    Any help??? Any useful ideas or examples links??? I'm still in dark here.

Similar Threads

  1. reimplementation of collidesWithItem()
    By MrBeerBear in forum Newbie
    Replies: 5
    Last Post: 3rd February 2015, 17:26
  2. QPlainTextEdit reimplementation
    By qt_developer in forum Qt Programming
    Replies: 2
    Last Post: 14th November 2012, 16:22
  3. QHeaderView paintSection reimplementation
    By supergillis in forum Qt Programming
    Replies: 3
    Last Post: 26th November 2008, 18:16
  4. keyPressEvent() reimplementation
    By aurelius in forum Newbie
    Replies: 5
    Last Post: 30th October 2008, 17:23
  5. QAbstractTextDocumentLayout handler problem
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 26th April 2008, 21:58

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.