I am using ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux], compiled with RVM, and I have compiled qtruby from git (without phonon), on Fedora 16. When I try to run the pixelator example I get the following error: `method_missing': Cannot handle 'QFlags<QStyle::StateFlag>&' as return-type of QStyleOption::state (ArgumentError) As far as googling for that error message goes, it seems this is generated by smoke... This is bad, because a packaged example doesn't work(!), and it completely breaks the rendering of custom item delegates with a little complexity. Reproducible: Always Steps to Reproduce: 1. use ruby 1.9.3 and qtruby from git 2. prepare to run the pixelator example (rcc the resources, etc.) 3. run the pixelator example Actual Results: ruby exited with the above mentioned error Expected Results: show the pixelator example A very stripped down script, which, for me, reproduces the error every time, would be: require 'Qt4' test = Qt::StyleOption.new puts test.state
This error is related to smoke and should have been fixed in recent revisions. Please get smokegen from git and rebuild smokeqt (preferably also from git) and tell us if it works :) The fix should be included in the 4.9 release if smokegen.
Thank you for the quick response! I now got smokegen, smokeqt and qtruby from current git master and built them. Unfortunately, that doesn't solve the issue. I am still getting the same error.
I've just tried this myself, works flawlessly: $ irb irb(main):001:0> require 'Qt4' => true irb(main):002:0> test = Qt::StyleOption.new => #<Qt::StyleOption:0x00000001a71808> irb(main):003:0> test.state => 0 irb(main):004:0> Are you sure that you're using the new smokegen version to build smokeqt? Does qtruby use the new version of smokeqt?
You're right, sorry. It must have used the version from the package manager instead of the one I built, so I removed the pagages and rebuilt everything. Now it's working fine. Thank you for your help!