[Kde-bindings] Qt, Qyoto buttons work intermediately

Arno Rehn arno at arnorehn.de
Tue Feb 16 09:14:47 UTC 2010


On Tuesday 16 February 2010 10:09:23 linuxoidoz at yahoo.com.au wrote:
> > Rather with
> > 
> > class MainClass {
> > 
> > 	static MainWindow win;
> > 	
> > 	public static int Main(string[] args) {
> > 	
> > 		...
> > 		win = new MainWindow();
> > 		win.Show();
> > 		...
> > 	
> > 	}
> > 
> > }
> 
> Thanks for the tip, everything works perfectly well now after I used your
> main method.
> 
> But it didn't fix the issue with signals/slots only working if defined in
> the main application class. As soon as I move any slot into another class
> it becomes unvisible and stops transmitting triggered signals. Is there a
> workaround for that?
> 
> For example, if I use a
> 
> Connect(btnAbout1, SIGNAL("triggered()"), this, SLOT("ShowAbout()"));
> 
> in the MainApplication class - it works fine. As soon as I try to use it
> from another class:
> 
> public void AnotherClass(QMainWindow mainwin) {
> QObject.Connect(btnAbout2, Qt.SIGNAL("triggered()"), mainwin,
> Qt.SLOT("ShowAbout()")); ...
> 
> it doesn't do anything.
I need the exact code please. With code snippets alone I can't reproduce what 
you did there.

> > > What should I do with
> > > 
> > >  the patch?
> > 
> > Apply it?
> 
> Sorry, I don't know how to apply a patch. I've just used the above main
> class and it all works. 
Maybe read up on some unix basics, like 'diff' and 'patch'. You'd need to 
compile kdebindings yourself then. You should make yourself familiar with 
cmake and make - in general take a look at how to compile source code 
packages.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list