Created attachment 202947 [details] Test page In QT5, when the defualt Windows vista application style is used, basically all the html controls (text inputs, text areas, check boxes, radio buttons, drop down selects, etc) are rendered as if they are in a disabled state. I've attached a test html page and a screenshot.
Created attachment 202949 [details] Screenshot
After some digging, I found the cause of the problem inside the file RenderThemeQStyle.cpp near the following code: ControlPart RenderThemeQStyle::initializeCommonQStyleOptions(QStyleFacadeOption &option, RenderObject* o) const { // Default bits: no focus, no mouse over option.state &= ~(QStyleFacade::State_HasFocus | QStyleFacade::State_MouseOver); if (isReadOnlyControl(o)) // Readonly is supported on textfields. option.state |= QStyleFacade::State_ReadOnly; option.direction = Qt::LeftToRight; if (isHovered(o)) option.state |= QStyleFacade::State_MouseOver; setPaletteFromPageClientIfExists(option.palette); if (!isEnabled(o)) { option.palette.setCurrentColorGroup(QPalette::Disabled); option.state &= ~QStyleFacade::State_Enabled; } ... } During the initialization of the style options, the State_Enabled bit is removed if the control is disabled. However, in the constructor of the option, the state is initialized as State_None, which means disabled. We need either initialize the state as State_Enabled or add a "else" clause after the last "if" as shown below: if (!isEnabled(o)) { option.palette.setCurrentColorGroup(QPalette::Disabled); option.state &= ~QStyleFacade::State_Enabled; } else { option.state |= QStyleFacade::State_Enabled; }
This still exists in QT 5.1.
That looks rather plausible and is probably a regression I introduced. Looking into it. Great analysis, btw!
*** This bug has been marked as a duplicate of bug 112688 ***