Native PDF hyperlinks for cross-references – Feature Request
Currently, QElectroTech exports PDF files using Qt's QPrinter/QPainter, which renders content "flat" — text and shapes are drawn correctly, but there is no support for embedded hyperlink annotations in the PDF output.
This is why the workaround Python script (using PyMuPDF/fitz) was created: it post-processes the exported PDF to detect cross-reference labels, calculate target page positions, and inject clickable link annotations (/Annots) into the PDF.
It would be great to have this functionality built directly into QET's PDF export.
Why Qt6 is now the only way forward
Qt5 reached its end of life and is no longer receiving updates. This migration is not optional — it is a matter of long-term maintainability and security for QET. But beyond that, Qt6 also brings the technical solution to this very problem.
Qt5 was fundamentally limited to "painting" content onto PDF pages with no awareness of the document structure. There was no supported way to embed hyperlink annotations natively — hence the need for external post-processing tools like the Python script.
Qt6 introduced the QtPdf module, which works with PDF documents at a structural level rather than just drawing pixels. Starting from Qt 6.4, this module exposes proper PDF navigation and document structure capabilities, and the writing side is actively being extended. This makes it technically feasible to embed internal page-to-page hyperlinks (/Annots) directly at export time — no external library, no post-processing step, no Python script needed.
In short: the end of Qt5 support is already decided. The migration to Qt6 is inevitable. And Qt6 happens to bring exactly the PDF capabilities needed to implement native cross-reference links properly. This is the right moment to plan this feature as part of the Qt6 migration effort, rather than treating it as a separate task later.
Thanks to Alfonso and the community for the Python workaround in the meantime — it proves the concept works and that users genuinely need this feature!
"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !