Index: qt5/src/poppler-form.h =================================================================== --- qt5/src/poppler-form.h +++ qt5/src/poppler-form.h @@ -122,6 +122,11 @@ bool isVisible() const; /** + Set whether this form field is visible. + */ + void setVisible(bool value); + + /** The activation action of this form field. \note It may be null. Index: qt5/src/poppler-form.cc =================================================================== --- qt5/src/poppler-form.cc +++ qt5/src/poppler-form.cc @@ -162,6 +162,17 @@ return !(m_formData->fm->getWidgetAnnotation()->getFlags() & Annot::flagHidden); } +void FormField::setVisible(bool value) +{ + Guint flags = m_formData->fm->getWidgetAnnotation()->getFlags(); + if (value) { + flags &= ~Annot::flagHidden; + } else { + flags |= Annot::flagHidden; + } + m_formData->fm->getWidgetAnnotation()->setFlags(flags); +} + Link* FormField::activationAction() const { Link* action = nullptr;