Widget child = iterator.next();
String simpleName2 = Util.getSimpleName(child);
-
- if ("VBoxLayout$Slot".equals(simpleName2)) {
- // Replace slot with the actual widget in the slot
- child = ((SimplePanel) child).getWidget();
- simpleName2 = Util.getSimpleName(child);
- }
-
+
if (widgetClassName.equals(simpleName2)) {
if (widgetPosition == 0) {
w = child;
break;
}
widgetPosition--;
+
+ } else if (w instanceof VBoxLayout
+ && "VBoxLayout$Slot".equals(simpleName2)) {
+ child = ((SimplePanel) child).getWidget();
+ simpleName2 = Util.getSimpleName(child);
+ if (widgetClassName.equals(simpleName2)) {
+ if (widgetPosition == 0) {
+ w = child;
+ ok = true;
+ break;
+ }
+ widgetPosition--;
+ }
}
}