A
Adna rim
Hi,
I want to achieve that if someone clicks on a cell in a Qt::Table
something happens. This is my code:
#!/usr/bin/env ruby
require 'Qt'
class MyWidget < Qt::Widget
slots 'but_clie()'
def initialize(parent=nil)
super(parent)
@table = Qt::Table.new(10,10,self)
connect(@table,SIGNAL('clicked()'),self,SLOT('but_clie
()'))
end
def but_clie
puts "clicked"
end
end
app = Qt::Application.new(ARGV)
mw = MyWidget.new
app.setMainWidget(mw)
mw.show
app.exec()
# done
But If I start the app I always get this error:
QObject::connect: No such signal Qt::Table::clicked()
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
But the Qt3 doc tells me that it definitivly has the signal clicked() ?
What am I doing wrong here?
greets
I want to achieve that if someone clicks on a cell in a Qt::Table
something happens. This is my code:
#!/usr/bin/env ruby
require 'Qt'
class MyWidget < Qt::Widget
slots 'but_clie()'
def initialize(parent=nil)
super(parent)
@table = Qt::Table.new(10,10,self)
connect(@table,SIGNAL('clicked()'),self,SLOT('but_clie
()'))
end
def but_clie
puts "clicked"
end
end
app = Qt::Application.new(ARGV)
mw = MyWidget.new
app.setMainWidget(mw)
mw.show
app.exec()
# done
But If I start the app I always get this error:
QObject::connect: No such signal Qt::Table::clicked()
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'unnamed')
But the Qt3 doc tells me that it definitivly has the signal clicked() ?
What am I doing wrong here?
greets