<div dir="ltr">You can follow these steps: <a href="https://github.com/qgis/QGIS/wiki/Plugin-migration-to-QGIS-3">https://github.com/qgis/QGIS/wiki/Plugin-migration-to-QGIS-3</a><div><br></div><div>Don't change from PyQt4 to PyQt5, you can switch to "from qgis.PyQt.QtWidgets import <span style="font-size:13.333333015441895px">QMainWindow</span>" or similar import.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-28 15:53 GMT+03:00 SIGéal <span dir="ltr"><<a href="mailto:sigeal@sigeal.com" target="_blank">sigeal@sigeal.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    A look at this might help :<br>
<a class="m_-2921007607355592321moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/260125/make-qgis-python-plugin-for-both-versions-2-x-and-3-x" target="_blank">https://gis.stackexchange.com/<wbr>questions/260125/make-qgis-<wbr>python-plugin-for-both-<wbr>versions-2-x-and-3-x</a><br>
    <pre class="m_-2921007607355592321moz-signature" cols="72">-- 
Christophe
</pre><div><div class="h5">
    <div class="m_-2921007607355592321moz-cite-prefix">Le 28/02/2018 à 12:31, Sylvain POULAIN
      a écrit :<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      
      <div class="m_-2921007607355592321wiki">
        <p>Hi,</p>
        <p>I tried to migrate from plugins in Qgis 2 to Qgis 3. <br>
          I took the usefull group stats plugin as my main example to
          make transition.</p>
        <p>Unfortunatelly, <em>Plugin home page</em> and <em>tracker</em>
          links for this plugins are dead ( <a class="m_-2921007607355592321external" href="http://plugins.qgis.org/plugins/GroupStats/" target="_blank">http://plugins.qgis.org/<wbr>plugins/GroupStats/</a>
          ), my apologies if I'm not posting in right place.</p>
        <p>So I downloaded plugin and tried to converted it with
          changing Qt4 to Qt5 in py script, using 2to3, rebuilding with
          pyuic5 and pyrcc5 under linux. But now I'm stuck on a
          QMainWindow error. Where could I have help to solve and
          understand how to solve it ?</p>
        <p>Sincerely,</p>
        <p>Sylvain</p>
      </div>
      <br>
      <fieldset class="m_-2921007607355592321mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
QGIS-Developer mailing list
<a class="m_-2921007607355592321moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="m_-2921007607355592321moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a>
Unsubscribe: <a class="m_-2921007607355592321moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>