Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47302

QWidget::render does not respect target's position.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.5.0
    • GUI: Painting
    • None

    Description

      When I use QWidget::render to paint one widget on another one, the rendered widget doesn't respect target's position but uses top widget's coordinate system.

      To demonstrate what do I mean, I've attached an example.

      I'm creating splitter which contains 2 QLabels. Each QLabel has texts, but on paintEvent another QLabel is being rendered on it which should override default one. This however happens only for left one, not for right.

      That's because both rendered QLabels are being rendered at exactly the same position. You may move splitter to the left so the rendered QLabel for right QLabel will start overlapping it.

      According to docs both rendered QLabels should be painted over specified widgets but they are not.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            kicer Michał Walenciak
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes