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

QtDesigner does not allow using signals/slots on QScrollArea Widget



    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: Tools: Designer
    • Labels:
    • Platform/s:


      When I create a QScrollArea in QtDesigner, the tool automatically adds a QWidget called scrollAreaWidgetContents beneath it, which is hard-wired and cannot be removed.

      I can promote this widget to a custom class CustomWidget, and QtDesigner lets me define signals and slots for that custom widget.

      However, QtDesigner does not give me access to actually use the signals or slots. When I try to draw a connection to or from my custom widget, QtDesigner instead uses the QScrollArea as target or source. Alternatively, in the Signals and Slots window, the drop down menus do not offer the object scrollAreaWidgetContents, only the parent QScrollArea is available.

      I can manually edit the .ui file in a text editor and make the connection there, which works fine in the compiled tool after I uic the form. The manual change also shows up properly in the Signals and Slots view in QtDesigner, but when I click the sender item, my manual change disappears.

      All this makes me believe that this is a bug in QtDesigner that incorrectly filters out the automatically created widget from accessing it for signals and slots. This likely occurs as well for other widgets that auto-create children, like QDockWidget.

      Steps to reproduce

      • Open QtDesigner
      • Load the empty QWidget form
      • Add QScrollArea (a new widget scrollAreaWidgetContents appears beneath it)
      • Promote the scrollAreaWidgetContents to a custom class called CustomWidget
      • Add signals and slots to scrollAreaWidgetContents
      • Try to connect the signals or slots in QtDesigner --> this does not work

      I tested this with the QtDesigner version that comes with PyQt5.15.2, as well as the QtDesigner version that comes with Qt4 for C++.


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



            Unassigned Unassigned
            cerno_b cerno_b
            0 Vote for this issue
            2 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes