[Kde-bindings] Yet another segfault

Han Holl han.holl at pobox.com
Sun Oct 3 12:07:18 UTC 2004


Variations on a theme: 

require 'Qt'

class Segdemo < Qt::Widget
  def initialize(*k)
      super(*k)
      lay = Qt::HBoxLayout.new(self)
      ed = Qt::LineEdit.new('blah',self)
# next line should be: lay.addWidget(ed)
      lay.addWidget(lay)
  end
end

if $0 == __FILE__
    a = Qt::Application.new(ARGV)
    w = Segdemo.new
    a.mainWidget = w
    w.show
    a.exec
end

Results in :
client.rb:17: [BUG] Segmentation fault
ruby 1.8.1 (2004-03-08) [i686-linux-gnu]

Aborted

In my first two days with qtruby I made errors like this for real.

Cheers,

Han Holl





More information about the Kde-bindings mailing list