[Kde-bindings] How does QtRuby do lvalues?

Chris Burel chrisburel at gmail.com
Mon May 4 01:36:33 UTC 2009


Hi all,
I'm trying to get the itemviews/chart example to work in PerlQt, but
I'm hung up on the way that the QStyleOption is implemented.  Since
the c++ api is designed for the programmer to have direct access to
the variables, that means that to assign to those I need to use an
lvalue.  Can someone point me to where that is in QtRuby?
Specifically, I'm wondering how these lines from pieview.rb work:
325 option = viewOptions()
326 option.rect = visualRect(labelIndex)
327 if selections.isSelected(labelIndex)
328     option.state |= Qt::Style::State_Selected.to_i
329 end
330 if currentIndex() == labelIndex
331     option.state |= Qt::Style::State_HasFocus.to_i
332 end



More information about the Kde-bindings mailing list