Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT Designer adds QGridLayout in generated XML but not visible in Object Inspector



  • I have a .ui file which is part of a github project. (ie I didn't design it.)
    QT Creator/Designer is instantiating a QGridLayout in the xml file, but that component is not visible in the form previewer nor the Object Inspector. Here is a snippet of code from my .ui form XML file:

    ...
     <layout class="QGridLayout" name="gridLayout">
     <property name=...>  (Several related properties not relevant)
          <item row="0" column="0">
                <widget class="qfi_NAV" name="graphicsNAV">
             ...
                <property xxx...> (lots of properties)
            ...
                </widget>
          </item>
      </layout>
    
    

    However, the only three items shown in the form designer's Object Inspector are:

    myWidget  |  QWidget
        myFrame  |  QFrame
            graphicsNAV  |  qfi_Nav   (my own subclass of QGraphicsView)
    
    

    Any idea why I don't see the QGridLayout which gets autogenerated from this .ui form? Why doesn't it appear on Object Inspector in QT Design mode? Where is this QGridLayout coming from and how do I control its properties if I can't see it?

    Thanks.


Log in to reply