Today I improved the line pattern, line width, and color selectors, I added a preview for ByLayer values and for Custom values only in color selector.
The three widgets are connected with the layer widget, and they receive an event each time another layer is selected. The preview are updated. So there is currently no preview until a layer is manually selected.

The function to set the selected item was added to the line width and color selectors. Line pattern selector can use the setCurrentText method.

Tomorrow I'll work on the unit tests for the line width and color selectors.