<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix"><font face="Helvetica, Arial,
        sans-serif"><span class="Y2IQFc" lang="en">Great, what if I want
          an icon too?</span></font></div>
    <div class="moz-cite-prefix">Thanks in advance for any help<font
        face="Helvetica, Arial, sans-serif"><span class="Y2IQFc"
          lang="en"></span></font></div>
    <div class="moz-cite-prefix"><font face="Helvetica, Arial,
        sans-serif"><span class="Y2IQFc" lang="en">Giulio<br>
        </span></font></div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Il 27/04/2023 00:06, Nyall Dawson via
      QGIS-Developer ha scritto:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAB28AsjgS0p=XJ5AKh1uazeyByMH_TxS6c8D1OPPRSrHV679ag@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr"><br>
        <br>
        On Thu, 27 Apr 2023 at 07:42, Catania, Luke A ERDC-RDE-GRL-VA
        CIV via QGIS-Developer <<a
          href="mailto:qgis-developer@lists.osgeo.org"
          moz-do-not-send="true" class="moz-txt-link-freetext">qgis-developer@lists.osgeo.org</a>>
        wrote:<br>
        ><br>
        > But I am looking to access the dock widget and add two
        icons in its row of icons or maybe a menu.<br>
        <br>
        It's not available via the stable API, but let's not let that
        stop us! 😆<br>
        <br>
        layer_tree = iface.layerTreeView()<br>
        layer_tree_dock = layer_tree.parent().parent()<br>
        toolbar = layer_tree_dock.findChildren(QToolBar)[0]<br>
        <br>
        my_action = QAction('something')<br>
        toolbar.addAction(my_action)
        <div><br>
        </div>
        <div>Nyall</div>
        <div><br>
        </div>
        <div><br>
          ><br>
          >  <br>
          ><br>
          > Thanks in advance for any help,<br>
          ><br>
          > Luke<br>
          ><br>
          > _______________________________________________<br>
          > QGIS-Developer mailing list<br>
          > <a href="mailto:QGIS-Developer@lists.osgeo.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">QGIS-Developer@lists.osgeo.org</a><br>
          > List info: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
          > Unsubscribe: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>