<p>The best way right now is to use org.kde.qtextracomponents and use QIconItem and set the icon property to e.g. "dialog-warning".</p>
<p>Its the equivalent to kdes kicon and what not.</p>
<p>And you can discover which icon you want by using kdialog --geticon actions. </p>