<?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[Changing the &#x27;active&#x27; widget]]></title><description><![CDATA[<p dir="auto">Hi all.</p>
<p dir="auto">I'm trying to solve an interaction problem with Qt, may be someone can give me some<br />
hints... Here's my problem: I have a simple button that, under certain circumstances,<br />
should take control over a scroll bar.</p>
<p dir="auto">More precisely: when the user presses the button and does not release the mouse button<br />
before a while, I want to show some form where the focus widget should be a scroll bar. Moving<br />
the mouse should now control the scroll bar... The point is to let the user create this form and<br />
start using the scroll immediately without having to release the mouse button, move to the<br />
scroll bar, click again and... move to set its value.</p>
<p dir="auto">I tried to send Events directly to the scrollbar (Enter, Press, Move). I tried to set the scroll<br />
bar as the active widget. I tried to make sure events were properly dispatched (calling<br />
QApplication::processEvents()).. Nothing works: my scroll bar never reacts to events until I<br />
actually click onto it.</p>
<p dir="auto">Is there a way that I haven't found in the docs to programmatically force a Widget to become<br />
'active', as if I had triggered a MousePress event? I suspect the parent widgets to all the job of<br />
dispatching the event according to their location, and locate the 'active' widget (the one that<br />
from now on will receive the incoming MouseMove events).</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.qt.io/topic/23240/changing-the-active-widget</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 00:27:15 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/23240.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Jan 2013 13:59:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Changing the &#x27;active&#x27; widget on Thu, 31 Jan 2013 18:30:35 GMT]]></title><description><![CDATA[<p dir="auto">This is probably a bit late and I must admit I have absolutely no idea if this will work, but it may be worth looking at calling "setSliderDown":<a href="http://qt-project.org/doc/qt-4.8/qabstractslider.html#sliderDown-prop" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-4.8/qabstractslider.html#sliderDown-prop</a> where you create your slider.</p>
]]></description><link>https://forum.qt.io/post/165476</link><guid isPermaLink="true">https://forum.qt.io/post/165476</guid><dc:creator><![CDATA[goblincoding]]></dc:creator><pubDate>Thu, 31 Jan 2013 18:30:35 GMT</pubDate></item></channel></rss>