Results 1 to 16 of 16

Thread: Reparenting

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Reparenting

    Yikes - what a hostile and rude response to a completely valid user experience challenge. Other people like myself are encountering the same thing:
    You realize you are complaining about a 14 year old post? Some of those people are still around and active in this forum, though.

    In Wysota's defense, while he can be brusque at times, his point is nonetheless valid: If you don't like the tool, don't use it. All Qt Designer is is a visible interface on top of an XML editor. The creators of Qt Designer chose a particular interaction style, which as the OP pointed out, is different from the one that he / she was used to when working in a different GUI environment. If you don't like Qt Designer, then you can build your GUI in C++ code without a ui file (which I often do for QMainWindow classes) or you can learn the ui XML syntax and hand code it (which I occasionally do when I want to tweak an interface or when I've screwed it up so badly in Designer that I have to fix it first before editing it again).

    There are several quirks to using Qt Designer that take time to understand and to work around. Over the 14 years since this original post, Qt Designer has improved so some of these interactions are not so frustrating as they once were. Some quirks remain, especially around the use of layouts. If you add certain widgets to a layout before others, it can be extremely difficult to add the new widgets because the first widget has expanded to take up all the space. On a high-res monitor, the line between being inside a layout and outside it can require extremely precise mouse movements to get the UI to show that you are inside the box. A layout that has been locked can't be modified and it can be difficult to select the layout itself and not one of the objects within it. And on and on. Over time and with enough use, you learn the idiosyncrasies and find workarounds.

    Prior to Qt5, there was no form layout, for example. It was added because the vertical, horizontal, and grid layouts didn't handle the layouts of forms where you might want editing widgets to align in a pleasing visual arrangement. 14 years ago, this didn't exist.

    It can be frustrating for a new user. And in the case of the OP's original question, the use of terminology ("reparenting" which has an entirely different meaning in the Qt world) contributed to the confusion about the question.

    Both of the links you posted involve these quirks with the use of layouts. In the second case, the poster is using a transparent (rectangular) widget with a non-rectangular image and trying to use existing (rectangular) layouts to look right, without a lot of success. As one of the responses said, he may have to develop his own layout manager that takes into account the irregular image.
    Last edited by d_stranz; 5th September 2020 at 20:55.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.