Bug 309651

Summary: QMenu uses black text on black background
Product: [Unmaintained] Necessitas Reporter: Martin Koller <martin>
Component: Android Qt4Assignee: BogDan Vatra <bogdan>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version First Reported In: beta1   
Target Milestone: Unspecified   
Platform: Android   
OS: Android 4.x   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Martin Koller 2012-11-06 13:48:15 UTC
I'm using a QMenu populated with some QActions and when using menu->popup() I can not read anything as there is black text on black background.

I tested this on an Asus Transformer Pad (Android 4.1.1) and on a HTC sensation (Android 4.0.3)

I think there is a general problem with the QPalette settings as I had nother problem when using a QListWidget where I had white color on white background.

Reproducible: Always
Comment 1 Martin Koller 2012-11-06 14:09:15 UTC
It seems that the drawing uses the wrong colors, because when I explicitely change the palette popup->backgroundRole() color to gray and the WindowText color to white, I still do not see the text - only the background color changes to gray.

e.g.:
  QPalette pal = popup->palette();
  pal.setColor(popup->backgroundRole(), Qt::lightGray);
  pal.setColor(popup->foregroundRole(), Qt::black);
  popup->setPalette(pal);