Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] QtDesigner leaves redundant <tags/>?
QtWS25 Last Chance

[Solved] QtDesigner leaves redundant <tags/>?

Scheduled Pinned Locked Moved Qt Creator and other tools
9 Posts 2 Posters 2.1k Views
  • 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 Offline
    Z Offline
    Zingam
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • Z Offline
        Z Offline
        Zingam
        wrote on last edited by
        #3

        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
        0
        • Z Offline
          Z Offline
          Zingam
          wrote on last edited by
          #4

          !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
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            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
            0
            • Z Offline
              Z Offline
              Zingam
              wrote on last edited by
              #6

              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
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                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
                0
                • Z Offline
                  Z Offline
                  Zingam
                  wrote on last edited by
                  #8

                  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
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    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
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved