[Kde-bindings] Segfault after grave programmer error

Han Holl han.holl at pobox.com
Sat Oct 16 11:03:52 UTC 2004


Hello Richard,

Another way to segfault, is to use member functions of an object before the 
initialization of the super class, like so:

#!/usr/bin/ruby

require 'Qt'

class MyWidget < Qt::ComboBox
  def initialize
    insertItem('abc')
    super
  end
end

a = Qt::Application.new(ARGV)
w = MyWidget.new
a.mainWidget = w
w.show
a.exec

Cheers,

Han Holl




More information about the Kde-bindings mailing list