The code you show is explicitly calling the base class assignment, i.e. only the base class parts of the QStyleOptionButton
get assigned, but not the member variables of the object.
It appears from the documentation, that no operator=
is declared for QStyleOptionButton
, so if one would call the usual assignment on such an object, the compiler would try to generate such an operator, consisting of the assignment of each base class subobject and each member variable.
Such a generated operator may or may not compile, depending of whether all members and base classes are copyable. In such cases it is usual to define the operator manually, to do the assignment correctly, if the class should be copyable at all.
However, the probable reason to call the base class assignment explicitly is that indeed only the base class parts need to be copied, while the other class members should not be changed, so this is not a "real assignment" in the semantical sense.