Good afternoon and evening. I have a function that takes arguments, such as url and title, of type QUrl and QString, respectively. How to connect the signal and call the function if the program (!) Was started-restarted? My guess was this:

connect(&app, SIGNAL(appStarting(QUrl,QString)), this, SLOT(getTitle(QUrl,QString))); 

Is it worth it?

  • Why signal / slot? Why not call the required method in the main? - AlexDenisov 1:19 pm
  • Unnecessary memory loss when calling a program without parameters - stck
  • You think something wrong, or me. I probably. What does "Extra memory loss when calling a program without parameters" mean? Can you describe the task in more detail? - AlexDenisov
  • No, still I did not think so when I wrote. It was just necessary to parse the parameters and to hang in memory at zero, but not to display it. If there are parameters, return the interface and already visualize the actions. Sorry, I made a kindergarten:] - stck

1 answer 1

In the designer of the main window, make a connection and you will be happy