What is the purpose of a virtual operator ()() here? <p>I'm trying to modify <a href="https://github.com/cesarbs/sizegripitem" rel="nofollow noreferrer">code I found</a>, but I'm blocked by my lack of understanding of the purpose, importance, and/or relevance of this virtual operator:</p> <ol> <li>Can someone provide insight as to why this operator is necessary or useful? </li> <li>Am I right in thinking it takes <code>parentItem()</code>, <code>rect_</code>, and <code>resizer_</code> as parameters, then modifies the value of <code>resizer_</code>?</li> </ol> <p><strong>Constructor in .h:</strong> </p> <p><code>virtual void operator()(QGraphicsItem* item, const QRectF&amp; rect) = 0;</code></p> <p><strong>Call in .cpp:</strong> </p> <p><code>(*resizer_)(parentItem(), rect_);</code></p> <p><strong>Trimmed context for the constructor for reference:</strong></p> <pre><code>class SizeGripItem : public QGraphicsItem { private: class HandleItem : public QGraphicsRectItem { public: HandleItem(int positionFlags, SizeGripItem* parent); private: SizeGripItem* parent_; }; public: class Resizer { public: virtual void operator()(QGraphicsItem* item, const QRectF&amp; rect) = 0; }; SizeGripItem(Resizer* resizer = 0, QGraphicsItem* parent = 0); virtual ~SizeGripItem(); private: void doResize(); QRectF rect_; Resizer* resizer_; }; </code></pre>