ya, children() method of a QObject returns a QList which has the at() method and the index operator.
as jo said, this plugin was incomplete, i think it is actually safe to remove the listener code as you did first. as long as the python code for sending key events doesn't become a performance bottleneck i dont see the need to port this to cpp. s On Tue, Oct 16, 2012 at 10:54 AM, Tony Barbieri <[email protected]> wrote: > Hey Jo, > > Thanks for the welcome and reply! > > I totally understand. I'm not sure where the debug info is coming from, > but I did manage to *solve* it by changing one line in your demo code. I > noticed that in the VK_UP case statement you had put: > > QApplication::sendEvent(sianchor->children().at(i), &e); > > And in the VK_DOWN case statement you had: > > QApplication::sendEvent(sianchor->children()[i], &e); > > Changing the VK_UP statement to match the VK_DOWN statement does make the > debug info go away but I haven't tested to make sure that it is even being > called correctly anymore. No errors are thrown so I am assuming it is ok. > I'm also not sure what the difference with using .at vs using [n] is. > > I don't consider this solved, but it does make the print statement go away > for now. > > Thanks again for the reply and for sharing your technique! > > Best, > > -tony > > On Tue, Oct 16, 2012 at 1:34 PM, jo benayoun <[email protected]> wrote: > >> hey Tony, >> welcome aboard. I did not find any explicit message that would match >> what you get (I quickly grep the source code, this would deserve much more >> investigations). >> As you're the first one to report this kind of problem, and as you have >> compiled pyside, Ive emitted the idea that it could be one of the qt source >> numerous debug messages because of a debug flag accidentally turned on for >> compilation. Even if I wish, I can't really help on that one, I miss time >> because of the job and my other commitments but feel free to use my email >> anytime ... >> For completeness, the code in cpp you can find in the plugin has been >> put there to show the way I did my personal qt integration when people were >> asking how ... Ive always warned and repeated about the fact that this is >> what it is, a demo code ... Ive been just too busy (or maybe lazy) to >> release the complete thing I guess. besides, I've not worked that much >> with pyside in softimage, mainly because when I wrote the code, pyside >> wasnt even in beta and studios are still committed to riverbank ... but >> considering the only major difference between pyqt and pyside is the vendor >> and the binding generator, this doesn't change anything on its usage with >> the plugin nor with the way I used to integrate qt into proprietary >> softwares ... >> -- jo >> >> >> >> >> >> 2012/10/16 Tony Barbieri <[email protected]> >> >>> Hey Steven, >>> >>> I just joined the list this morning so I could join in the conversation. >>> Do you happen to know if Jo found that in the actual Qt source code or in >>> PySide? >>> >>> I compiled both debug and release but compiled PySide against the >>> release .dlls. >>> >>> Thanks! >>> >>> -tony >>> >>> so, you guys are compiling it yourself... maybe with debug mode on? jo >>> just grep'd the qt code base and found debug message with "caught" in it >>> >>> >>> On Mon, Oct 15, 2012 at 4:54 PM, Steven Caron <[email protected]> wrote: >>> >>>> oh nice! >>>> >>>> >>>> On Mon, Oct 15, 2012 at 4:46 PM, Bradley Gabe <[email protected]> >>>> wrote: >>>> >>>>> Tony said he didn't have to do any "work" to get PySide going. He just >>>>> compiled the latest version... >>>> >>>> >>> -- >>> -tony >>> >> >> >> > > > -- > -tony >

