Passing arguments to QObject::connect SLOT function

I'd like to know how can i pass arbitrary arguments to a function called in the SLOT of connect.

This is my snippet of code of the connect that i use:
QObject::connect(dialog, SIGNAL(signal()), this, SLOT(setter()));

(dialog is another class with its files)

How can i pass an argument to the setter() function without the error "QObject::connect: No such slot MainWindow::setter()" ?
I have tried to search this topic on Internet, but i couldn't find anything useful (to me)...

What do you mean by passing arbitrary arguments to function? C++ is a statically typed language. A function always takes a defined type arguments.

When using the above connectsyntax what you can put in the SLOT macro is limited to (obviously, as the name suggests) the slots of that receiver class.
There are a couple more overloads of the connect function that don't use macros. In these you can pass any functor (member, function or a function object like a lambda or a class/struct with operator() ) that either matches the arguments of the signal or has fewer of them.

Maybe it would be easier to help if you said what you actually try to achieve?

@Chris-Kawa I'd like to make the setter function take an int argument, like a variable or a literal or even a function that returns an int. When I try to pass to setter an argument, for example 10, I get this error with connect: "QObject::connect: No such slot MainWindow::setter()", even if I have defined the slot: "void setter(int x)"...

Signal is a function. It takes parameters. You specify parameter values at the call site (emit).
For example if there is a signal void somethingHappened(int) you can emit it somewhere: emit somethingHappened(42);. At this time any slot connected to that signal will be called with value 42.