Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Calling QWidget::render() inside QQuickPaintedItem::paint() works on Debian PC but not on Raspbian?
Qt 6.12 LTS is out! See what's new in the release blog

Calling QWidget::render() inside QQuickPaintedItem::paint() works on Debian PC but not on Raspbian?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 370 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.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by
    #1

    Hi,
    I have the same problem as described in this forum post, where I use a QQuickPaintedItem to render a QWidget for use inside a QML app.

    The render() command below triggers the exception shown further below:

      void paint(QPainter *painter) { //QQuickPaintedItem::paint
          //qDebug() << this->thread() << current_analyzer_->thread();
    
          if (current_analyzer_) //current_analyzer_ is a QWidget-derived class instance 
              current_analyzer_->render(painter, QPoint(), QRegion());
      }
    

    Exception:

    __logging_message__16:46:41.679 ERROR unknown                          ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x261ffc0. Receiver '' (of type 'Analyzer') was created in thread 0x0x23a2bf8", file /home/buster/raspi/qt-everywhere-src-5.15.0/qtbase/src/corelib/kernel/qcoreapplication.cpp, line 558
    11:46:41: Remote process crashed.
    

    The link above explains the problem, but does not really explain why the exception is triggered on Raspbian (Pi3B+) but not on Debian (PC), both using Buster and Qt5.15.

    The same construction used to work on both platforms with Debian/Raspbian Stretch and a few Qt releases ago. So why would rendering a QWidget inside a QQuickPaintedItem work on one platform but not on the other?

    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
    • Unsolved