Dominic Reynolds wrote:
Ah ok. I didn't understand that this would be a widget automagically added to a form in the case default layout rules couldn't generate a standard UI.
From bubli's post I guess there are a number of widgets that require you to check the UI that you are in and code accordingly.
Whats the best way to be aware of QT only widgets so that when you are developing you know that for ncurses support you need special handling? Is there a naming convention for them?
Frankly, I thought about more possibilities, but for me, the best would be: * You can use that widget (only) manually. For other cases, layout should behave as it did before. * Ncurses would know but _ignore_ that widget. * GTK+ could but needn't to support it. Example of a simple dialog with two stretchable widgets taking 1/4, resp. 3/4, of the dialog: --- cut --- `VBox ( `VWeight ( 1, some_other_widget (`opt (`vstretch)) ), `VWeight ( 3, some_other_widget (`opt (`vstretch)) ) ) --- cut --- Example of the same dialog with additional splitter: --- cut --- `VBox ( `VWeight ( 1, some_other_widget (`opt (`vstretch)) ), `VSplitter(`opt (`do_we_need_any_options?)), `VWeight ( 3, some_other_widget (`opt (`vstretch)) ) ) --- cut --- That wouldn't need any additional checking for UI support. Yes, there are several Qt-only widgets: http://forgeftp.novell.com/yast/doc/SL10.2/tdg/Book-UIReference.html (IV. Special (optional) widgets) For checking, whether some widget is supported, we use http://forgeftp.novell.com/yast/doc/SL10.2/tdg/YUI_special_widgets_HasSpecia... Nevertheless the documentation seems to be a bit odd :) see how is this used in our source code: if (!UI::HasSpecialWidget (`DumbTab)) if ( ! UI::HasSpecialWidget(`PatternSelector ) UI::HasSpecialWidget(`BarGraph ) ... The best way is to know both, the standard widget set and the optional widget set. I don't think we have any naming convention. L.