[Kde-bindings] Simple KCrash question
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Tue Apr 27 14:15:54 UTC 2004
On Tuesday 27 April 2004 14:55, Richard Dale wrote:
> On Tuesday 27 April 2004 14:43, Martin Welch wrote:
> > Unfortunately that didn't work :(
> >
> > I've tried different combinations of flags, parents and names with the
> > same result.
>
> If you want to test creating KMainWindows, I think I'd have a button
> labelled 'new window', and everytime you click that it creates a new one.
> Then you could tell if the problem was with the flags/parents in window
> creation, or whether it was something to do with creating windows in
> 'unusual places', such as in polish().
I just wrote a test program in ruby, and what I did notice is that polish() is
called more than once - six times for a KMainWindow. But it has no trouble
creating lots of windows.
ruby show_window.rb
In polish()
In polish()
In polish()
In polish()
In polish()
In polish()
-- Richard
#!/usr/bin/env ruby
require 'Korundum'
class MainWindow < KDE::MainWindow
slots "show_window()"
def initialize( *k )
super( *k )
@button = KDE::PushButton.new( 'Show window', self, '@button' )
Qt::Object::connect @button, SIGNAL("clicked()"), self,
SLOT("show_window()")
@window_list = []
end
def show_window()
window = KDE::MainWindow.new(self, "temp#")
@window_list.push window
window.show
end
def polish()
puts "In polish()"
window = KDE::MainWindow.new(self, "temp#")
@window_list.push window
window.show
end
end
about = KDE::AboutData.new("showwindow", "Show Window Test", "0.1")
KDE::CmdLineArgs.init(ARGV, about)
a = KDE::Application.new()
hello = MainWindow.new(nil, "foobar")
a.setMainWidget(hello)
hello.show()
a.exec()
More information about the Kde-bindings
mailing list