Posts

Post not yet marked as solved
2 Replies
There is no error per se. My doubt is about how to dynamically use swiftui on the fly. To give an idea on the flow: // MyApp.swift import SwiftUI @main struct MyApp: App { let obj = MyWorkerClass () init ()     {         obj.callEntryPoint ()     } var body: some Scene {         WindowGroup { ContentView () } } } // ContentView.swift import SwiftUI struct ContentView: View { var body: some View {         VStack {             Image(systemName: "globe")                 .imageScale(.large)                 .foregroundColor(.accentColor)             Text("Hello, world!")         }         .padding()     } } // MyWorkerClass.swift class MyWorkerClass { func callEntyPoint () { // Switch to a worker thread and do some operations  DispatchQueue.global(qos: .background).async { // Once the operations are done, Show some UI change on the Main thread DispatchQueue.main.async { // Create a new Label on the screen } } } }
Post marked as solved
3 Replies
Thanks, understood the logic. How do you use 'selectedRowInDataTable' and 'selectedColInDataTable' to set up the cursor in the right cell?
Post not yet marked as solved
4 Replies
Hi, Wanted to share a bit more context as it seems my question didn't come out in the right way. I'm using an library for building my applications(Qt). The library itself has defined an ApplicationDelegate and has member functions inside it to handle various lifecycle events. I want to override the Library's methods to execute my own code in the lifecycle events, to setup my application and then hand it back to the library's method to continue execution.