yes i am aware of that suggestion for the timer event, aloys baillet made it here on the list.
i would like the PyQtForSoftimage plugin to work in the same way and be cross platform. if we can't find a method without using a timer event then i guess we can change the windows one to using a timer event. s On Wed, Jan 23, 2013 at 10:23 PM, [email protected] < [email protected]> wrote: > ** > I read somewhere (sorry, forgot the link) that just doing a Xreparent > alone won't work and you will need to do more. I am guessing that the > Windows SetParent method also processes all child windows??? > > I think this was mentioned a long time before and a python example was > shown. Anyway, the idea was to use Softimage's timer event to process > events every 30ms or so. You can have the event muted by default and turn > it on/off whenever needed. This has worked so far. I'm sure that you can > use X to do the processEvents which is probably the ideal way but will need > to do more reading and research. > > Here's the cpp code for the Event timer: > > > SICALLBACK > QtApplication_Timer_OnEvent( CRef & in_ctxt ) > { > if(qApp) > { > QApplication *app = (QApplication *)QApplication::instance(); > app->processEvents(); > app->sendPostedEvents(NULL, QEvent::DeferredDelete ); > > } > > return 1; > } > > > Michor > > > > > On 23/01/2013 02:33, ran sariel wrote: > > > Hi Steven > > Tried the reparent method for X and managed to compile and link it on > centos6.2, > the app and widget are created on the plugin side, the anchor is parented > to the app handle (or at least doesn't tell me that it's failing) > The thing is that the "show" method doesn't raise the dialog that I create > and parent to the "anchor" widget. > I still need to figure out how to implement the listener function on X, > (wasn't sure if it was needed just to get the dialog to show...), hoping > that this will lead to the same behavior you have on Windows. let me know > if you have any insights on this one. > > Cheers > Ran > > > > On Fri, Jan 18, 2013 at 5:26 PM, Steven Caron <[email protected]> wrote: > >> well i think you might need to use the os specific function for >> parenting, otherwise we would have used the Qt method. if there is a Qt >> method for parenting then i might handle the platform for us and make the >> code work on both operating systems. but i think you will need to use the >> os specific function call, which i linked to in the email. >> >> you are correct about the plugin's design, use cpp to setup the >> application and a dummy widget that you return to scripting. all subsequent >> widgets are parented to (in python) using the return value. >> >> s >> >> >> >> On Fri, Jan 18, 2013 at 5:12 PM, ran sariel <[email protected]> wrote: >> >>> so you're creating the app on the plugin, and create a "dummy widget" >>> (sianchor) , as a child of xsi main window. >>> and from there on any widget you create is parented under siacnchor. >>> I believe the return of getApplicationWindowHandle on linux is an x >>> window, >>> there should be a way in qt to parent a widget to x window, - never >>> used it though, Will take a look on Monday, and see if I can make any >>> progress there. >>> >> > >

