Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11154 problems about property "enabled" of children widgets vs "enabled" of parent widget
  3. QTBUG-11267

Re: problems about property "enabled" of children widgets vs "enabled" of parent widget

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Moved
    • Not Evaluated
    • None
    • Tools: Designer
    • None
    • 4.7.0 beta 1, but I saw the same in 4.6.2

    Description

      (is there any way to re-open a bug report, which would be better than adding a sub-task?)

      1. First of all, in my report there was one clear bug:

      For disabled parent, you can double-click on "enabled" property of the child and you see it checked in QtDesigner, but what will be saved in .ui file for the child is:
      <property name="enabled">
      <bool>false</bool>
      </property>


      2. Second important point: you wrote:

      Qt Designer only supports changing the enabled-property for entire trees of widgets.

      I'm sorry but I don't understand what any rationale might be behind such a behaviour.

      If you set FONT-property (say, font-size) for parent and you don't set it for a child it will be propagated and used for the child too. But you can still change the font-size of the child in QtDesigner; you would not say "Designer only supports changing the FONT-property for entire trees of widgets", would you?

      Why would you choose for "enabled" to be treated in a different way???

      It's actually quite useful to set "enabled" of a parent and a child independently. Current behaviour limits what you can achieve in QtDesigner and there seems to be absolutely no benefit. Plus it is inconsistent with how other properties are treated!


      Plus maybe a lesser issue:

      3. Current behaviour still looses information without a warning (when you open a .ui file which had some children enabled and some disabled, you set parent to "enabled == false" and save => all children will have

      <property name="enabled">
       <bool>false</bool>
      </property>
      

      -> you cannot change later back to your previous situation by simply doing the reverse of what you did earlier: opening the .ui file and changing parent to "enabled == true"). Again, it is only because you chose to propagate "enabled == false" to the children in QtDesigner.

      Personally, if I know I have set any property of a child explicitly to "true", and I open a .ui file and change property of some parent of this widget to "false" I would be very surprised that in the saved .ui file now this child property would be set explicitly to "false". Maybe a section in docs should very, very clearly explain this behaviour? Have you chosen to do such propagation also for other properties? Does this happen only for some boolean properties or can I also loose information about other (not-boolean) manually set properties of a child when I later set a corresponding property of a parent widget in QtDesigner?

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            wiecko Marek Wieckowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes