[Kde-bindings] Simple KCrash question
Martin Welch
martin.welch at ilkestoncooptravel.co.uk
Tue Apr 27 14:47:38 UTC 2004
I think you have to call the base class implementation:
void CMainWindow::polish()
{
KMainWindow::polish(); <<<<<<<<<<<<<<<<<
printf("CMainWindow::polish\n");
if ( m_LoadCallBack != 0 )
m_LoadCallBack(this);
}
-----Original Message-----
From: Richard Dale [mailto:Richard_Dale at tipitina.demon.co.uk]
Sent: 27 April 2004 15:16
To: KDE bindings for other programming languages
Subject: Re: [Kde-bindings] Simple KCrash question
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()
_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org https://mail.kde.org/mailman/listinfo/kde-bindings
More information about the Kde-bindings
mailing list