Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [Solved] QtDesigner leaves redundant <tags/>?

    Tools
    2
    9
    1662
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      Zingam last edited by

      I have noticed that the .ui file is full of tags like this <layout class="QVBoxLayout" name="verticalLayout_3"> that do not appear in the visual editor. Why is that? They just polute the namespace? Is there a way to remove them?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Didn't you put your widget in layouts ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • Z
          Zingam last edited by

          Yes I did. And th ui looks very nice but when I start to type a few of these invisible in the outline layout names pop up. Tomorrow I'll post some xml. I checked other .ui files and they also contain such redundant layout tags.
          Like that:
          @
          <layout....
          <item>
          <layout>. - the actual layout @

          1 Reply Last reply Reply Quote 0
          • Z
            Zingam last edited by

            !http://i.imgur.com/FtXJH4V.png(This is Qt Designer)!
            @
            <widget class="QWidget" name="centralWidget">
            <layout class="QVBoxLayout" name="verticalLayout_2">
            <item>
            <layout class="QVBoxLayout" name="verticalLayout">
            <item>
            <layout class="QHBoxLayout" name="horizontalLayout">
            <item>
            <widget class="QPushButton" name="pushButton_Back">
            <property name="text">
            <string><</string>
            </property>
            </widget>
            </item>
            <item>
            <widget class="QPushButton" name="pushButton_Forward">
            <property name="text">
            <string>></string>
            </property>
            </widget>
            </item>
            <item>
            <widget class="QLineEdit" name="lineEdit_AddressBar"/>
            </item>
            <item>
            <widget class="QPushButton" name="pushButton_Go">
            <property name="text">
            <string>Go</string>
            </property>
            </widget>
            </item>
            </layout>
            </item>
            <item>
            <widget class="QWebView" name="webView">
            <property name="url">
            <url>
            <string>about:blank</string>
            </url>
            </property>
            </widget>
            </item>
            </layout>
            </item>
            </layout>
            </widget>
            <widget class="QStatusBar" name="statusBar"/>
            </widget>
            @

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Are you using the standalone Qt Designer or Qt Creator's ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • Z
                Zingam last edited by

                Both... but that code above was created by the standalone that comes with PyQt.

                I have a feeling that these layout elements are leftovers from deleted layouts that I removed while trying to design the form.

                This "issue" is not just limited to the standalone Qt Designer. I have such UIs created by QtCreator too.

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  Do do you have the same things happening with a fresh new design ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply Reply Quote 0
                  • Z
                    Zingam last edited by

                    I figured it out. Some Widgets have layouts and they appear as properties in Qt Designer but they are not shown in the outline. :)

                    Thanx!

                    1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      You're welcome !

                      Since it's all clear now, please update the thread title prepending [solved] so other forum users may know an answer has been found :)

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post