Solution (source code)

= Solution

Multiply the <Karush-Kuhn-Tucker conditions> on the right by $\widehat\Omega$ and take the <matrix trace>:
$$
-p+\operatorname{Tr}(S\widehat\Omega)+\lambda\operatorname{Tr}(Z\widehat\Omega)=0.
$$
Symmetry and the defining property of the <subgradient of the absolute value> give
$$
\operatorname{Tr}(Z\widehat\Omega)
=\sum_{i,j}Z_{ij}\widehat\Omega_{ij}
=\sum_{i,j}|\widehat\Omega_{ij}|.
$$
Consequently the last two terms in the objective sum to $p$, and hence
$$
Q(\widehat\Omega)=-\log\det\widehat\Omega+p.
$$