Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.1.2, 6.1.3, 6.2.0
-
None
-
Not applicable.
-
-
1c121ea7a (dev), e3cc2b1f8 (6.10), 5895269bf (6.9), 6ca4f6704 (tqtc/lts-6.8), 018749e4b (tqtc/lts-6.5)
Description
QUiLoader resolves wrong QLabel buddy
When loading the ui-file in 2 different widgets having the same parent resolving a
buddy-widget for a label goes wrong.
When the file is loaded for the second widget the buddy resolved is
pointing to the line-edit created in when the ui-file was loaded first.
Current Work-around
Use the QUiLoader::load() method without a parent (nullptr) a
nd setting the parent to the widget afterwards.
Personal Remarks
This is not the expected behavior or I must be mistaken.
The buddy resolving mechanism should limit itself to the widgets created
in the current loaded ui-file only like in Qt Designer application.
I added a single file with single function which illustrates the "bug".
It can easily be added to a unit testing environment.
Attachments
For Gerrit Dashboard: QTBUG-96693 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
650324,4 | Buddy: search for a buddy bottom-up rather than top-down | dev | qt/qttools | Status: MERGED | +2 | 0 |
651048,2 | Buddy: search for a buddy bottom-up rather than top-down | 6.10 | qt/qttools | Status: MERGED | +2 | 0 |
651240,2 | Buddy: search for a buddy bottom-up rather than top-down | 6.9 | qt/qttools | Status: MERGED | +2 | 0 |
651491,2 | Buddy: search for a buddy bottom-up rather than top-down | tqtc/lts-6.8 | qt/tqtc-qttools | Status: MERGED | +2 | 0 |
651543,2 | Buddy: search for a buddy bottom-up rather than top-down | tqtc/lts-6.5 | qt/tqtc-qttools | Status: MERGED | +2 | 0 |