[Interest] emitting signals from UIApplication app delegate?

Jason H jhihn at gmx.com
Wed Feb 24 17:17:49 CET 2016


I want a QObject class to emit a signal when a function in my app delegate is invoked. (Code follows) How can I do that? I don't know how to use QObjects in ObjectiveC

--- PlatformShimImpl.cpp
PlatformShimImpl::PlatformShimImpl(){
	qDebug() << Q_FUNC_INFO;
	QtAppDelegate *appDelegate = (QtAppDelegate *)[[UIApplication sharedApplication] delegate];
	[[UIApplication sharedApplication] setDelegate:[QtAppDelegate sharedQtAppDelegate]];
	//[[QtAppDelegate sharedQtAppDelegate] setWindow:appDelegate.window];
}


--- QtAppDelegate.mm
- (void)applicationWillResignActive:(UIApplication *)application
{
	[application setIdleTimerDisabled:NO];
	// emit resignActive()
}


Many thanks.



More information about the Interest mailing list