Wednesday, 11 September 2013

Ruby, write variable text into object text

Ruby, write variable text into object text

I know the question is most likely silly, but I don't understand Ruby
well, or in programming in general, googled as much as I could, but
couldnt find anything, dont know where else to ask. So, I need to make QT4
app but the problem is that when you click a button, the text from a
variable need to be written into object text. Cant understand why the
following doesn't work:
@questn="hi"
reply.connect(SIGNAL(:clicked)) do
@numberquestion.text = Qt::Application.translate("testapp",
"#{questn}", nil, Qt::Application::UnicodeUTF8)
end
May be I should use Signals, Slots, and methods?

No comments:

Post a Comment