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. QGraphicsTextItem problem when setting pageSize and documentMargin (part 2)
Forum Updated to NodeBB v4.3 + New Features

QGraphicsTextItem problem when setting pageSize and documentMargin (part 2)

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 651 Views 2 Watching
  • 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
    Jan-Willem
    wrote on last edited by
    #1

    Re: Editiable QGraphicsTextItem problem when setting pageSize and documentMargin

    I think I have found the problem. I went through the source code of the QGraphicsTextItem and came across the private _q_updateBoundingRect. In there there is a line:

    if (size == qq->m_boundingRect.size() || pageSize.height() != -1)
        return;
    

    The pageSize.height() != -1 part seems to be the problem. I have removed it and it seems to be working!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Why not put that in the original thread ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jan-Willem
        wrote on last edited by
        #3

        Hi,

        When I tried there was a popup saying the thread was old and asked if I would rather open a new one.
        And so I did.

        Anyhow, I've put it in the original thread and marked the thread as solved.

        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