<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to pass a QEvent to a QWidget&#x27;s child widgets?]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I want to automatically generate some QMouseEvent and let a QMainWindow widget to handle it. I'm currently using QCoreApplication::sendEvent(QObject * receiver, QEvent * event)<br />
function. But this function can only let the receiver (QMainWindow) to handle the event, it doesn't propagate the event to the receiver's child widgets.</p>
<p dir="auto">For example, in my QMainWindow, I have buttons and text fields and other components. When I send mouseEvent to the QMainWindow, I want the widget whose bounding box overlaps the event's location handles the event. But with the QCoreApplication::sendEvent function, I can only let the QMainWindow handles it.</p>
<p dir="auto">How do I propagate an event to a widget's child widgets?</p>
]]></description><link>https://forum.qt.io/topic/29662/how-to-pass-a-qevent-to-a-qwidget-s-child-widgets</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 22:38:23 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/29662.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Jul 2013 23:47:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to pass a QEvent to a QWidget&#x27;s child widgets? on Sat, 20 Jul 2013 00:05:47 GMT]]></title><description><![CDATA[<p dir="auto">this might help:<br />
<a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html</a></p>
<p dir="auto">If you want to do like a mouse over event on a QPushButton you will have to implement that yourself.</p>
<p dir="auto">However if you want something in a widget to call a function you just have to use the appropriate sender, SIGNAL(trigger), reciever, SLOT(func)</p>
]]></description><link>https://forum.qt.io/post/187235</link><guid isPermaLink="true">https://forum.qt.io/post/187235</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 20 Jul 2013 00:05:47 GMT</pubDate></item></channel></rss>