[Kde-bindings] Segfault (as promised)

Han Holl han.holl at pobox.com
Sun Oct 3 11:54:11 UTC 2004


On Sunday 03 October 2004 12:17, Richard Dale wrote:

> Please find a fixed version of Qt.cpp attached. I think it needs trying out
> to see if there are any unexpected side effects before commiting though.
>
> -- Richard

Well, that was fast. Works as expected now. Thanks.

Ok here's the following: it's not as bad, because you get a warning before, 
but it's a segfault nevertheless:

require 'Qt'

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

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

QLayout::addChildLayout(), layout already has a parent
client.rb:17: [BUG] Segmentation fault
ruby 1.8.1 (2004-03-08) [i686-linux-gnu]

Aborted





More information about the Kde-bindings mailing list