Default argument value vs. overload

Another minor aspect: In Qt/VTK apps, now that you can connect Qt signals to pointer-to-member-functions, I’ve sometimes found it convenient to connect Qt signals directly to VTK functions.

Overloaded functions can be somewhat awkward in that context though, even if Qt provides a helper function template to disambiguate (qOverload).

But yea, not a big issue. Just thought I should mention it since Qt itself recommends against adding overloads to slots in the library for this reason.

1 Like