Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126993

Setting property visibility to false in the property sheet does not change visibility

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.7.2
    • Tools: Designer
    • None
    • Linux x86_64

    Description

      This can be reproduced by creating a custom widget. Get the property sheet and call setVisible with false, this does not change the visibility.

      This applies to both built-in properties and custom properties.

      Example:

       

       

      QDesignerFormWindowInterface* form_window = nullptr;
      form_window = QDesignerFormWindowInterface::findFormWindow(this);
      if (!form_window)
          return;
      QDesignerFormEditorInterface* form_editor = nullptr;
      form_editor = form_window->core();
      if (!form_editor)
          return;
      QExtensionManager* manager = nullptr;
      manager = form_editor->extensionManager();
      if (!manager)
          return;
      QDesignerPropertySheetExtension* sheet = nullptr;
      property_sheet = qt_extension<QDesignerPropertySheetExtension*>(manager, this);
      if (!sheet)
          return;
      qInfo() << sheet->isVisible(sheet->indexOf("objectName"));
      qInfo() << sheet->isVisible(sheet->indexOf("customProperty"));
      sheet->setVisibility(sheet->indexOf("objectName"), false);
      sheet->setVisibility(sheet->indexOf("customProperty"), false);
      qInfo() << sheet->isVisible(sheet->indexOf("objectName"));
      qInfo() << sheet->isVisible(sheet->indexOf("customProperty"));
      

       

       

      This outputs:

      true
      true
      true
      true

      The properties are also still visible.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            bertreynolds bertreynolds
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes