我有以下代码:
require 'qt'
class Menu < Qt::Widget
slots 'on_clicked_uAuth()'
slots 'quit()'
def initialize(parent = nil)
super(parent)
setWindowTitle "Menu"
uAuth_ui
exit_ui
resize 350, 500
move 300, 300
show
end
def uAuth_ui
uAuth = Qt::PushButton.new 'Auth', self
uAuth.resize 150, 35
uAuth.move 100, 100
connect uAuth, SIGNAL('clicked()'), self, SLOT('on_clicked_uAuth()')
end
def exit_ui
exit = Qt::PushButton.new 'Exit', self
exit.resize 120, 40
exit.move 115, 420
connect exit, SIGNAL('clicked()'), self, SLOT('quit()')
end
end
app = Qt::Application.new(ARGV)
Menu.new
app.exec
当我单击任一按钮时,我收到以下错误:
stack level too deep (SystemStackError)
有人可以让我知道我应该进行哪些更改,以便当我单击按钮时,我会进入下一个屏幕?