Environment
- Built under OS X 10.6.8 (works fine there, too.)
- Application running under OS X 10.12
- Qt 4.7 (have to use this, 10.6.8 legacy support issues)
- Qt Creator 2.1.0
Issue
From OS X 10.6.8 through OS X 10.11, tooltips and QComboBox pop-up menu behaviors are fine.
Under 10.12, tooltips and the pop-up feature of QComboBox pop up menus are blank.
The tooltips are blank yellow sheets, the backdrop looks right, but no text. I'm setting the tooltip content in Qt Designer 2; nothing fancy going on there. And it's just vanilla text in every case.
The QComboBox pop up menus are missing both the text and the checkmark. When the popup is closed, so the widget just shows the one line, the selected item does show. You can also point at it, roll the mouse roller, and the items change as expected. It's just the popup list of items that's blank.
For the QComboBox pop-up menu, here's an example of use that has the problem:
int index;
ui->fftSizecomboBox->addItem("2048 pts", 2048);
ui->fftSizecomboBox->addItem("4096 pts", 2048 * 2);
ui->fftSizecomboBox->addItem("8192 pts", 2048 * 4);
ui->fftSizecomboBox->addItem("16384 pts", 2048 * 8);
ui->fftSizecomboBox->addItem("32768 pts", 2048 * 16);
ui->fftSizecomboBox->addItem("64K pts", 2048 * 32);
ui->fftSizecomboBox->addItem("128K pts", 2048 * 64);
ui->fftSizecomboBox->addItem("256K pts", 2048 * 128);
ui->fftSizecomboBox->addItem("512K pts", 2048 * 256);
ui->fftSizecomboBox->addItem("1M pts", 2048 * 512);
ui->fftSizecomboBox->addItem("2M pts", 2048 * 1024);
ui->fftSizecomboBox->addItem("4M pts", 2048 * 2048);
index = ui->fftSizecomboBox->findData(m_FftSize);
if ((index < 0) || (index > 11))
{
index = 1;
m_FftSize = 4096;
}
ui->fftSizecomboBox->setCurrentIndex(index);
It all seems pretty vanilla to me. I'm at a loss as to why it works under all the other OS X versions and balks under 10.12
Furthermore, in another app I wrote, I also use QComboBox popup menus, and they work under 10.12 in that app, so that also implies it's something I'm doing.
Other than just clicking on the popup menu to make it show the list of items, nothing happens to it. I don't even catch any messages from it; when I exit the dialog, then I look at it to see what the selection is (or I don't even do that, if the dialog has been cancelled.)
I submitted a bug report to Apple, which they have ignored for months, so either they don't care, or don't think it's their problem (and I'm guessing it probably isn't, even though it's only showing up in OS X 10.12) Of course, Apple often leaves bugs in the OS, so there's that.
[EDIT 1]
Something else I tried, to see if it was a palette color issue, was to load one of the tooltips with rich text, changing the font color, so that the painting wouldn't be done just using the palette colors. Worked under 10.6, but under 10.12, made no difference; tooltip was just as blank. Also, I see that the tooltip background color isn't the pale yellow it's supposed to be either -- it's white.
It's like the system has completely lost track of what it's supposed to be doing once the tooltip / popupmenu comes up.
[EDIT 2]
Here's the stylesheet code I am using for the QComboBox:
QComboBox::dropdown {
background: rgb(0,0,127);
color: rgb(0,255,0); /* color of dropped text*/
background-color: rgb(0,0,127); /* color of dropped backdrop*/
selection-color: rgb(0,255,0); /* color of sel text */
selection-background-color: rgb(0,0,0); /* color of sel backdrop */
}
QComboBox {
color: rgb(0,255,0); /* color of dropped text*/
background-color: rgb(0,0,0); /* color of dropped backdrop*/
selection-color: rgb(0,255,0); /* color of sel text */
selection-background-color: rgb(0,0,0); /* color of sel backdrop */
alternate-background-color: rgb(0,0,127);
alternate-selection=background-color: rgb(255,255,255);
}
This stylesheet does exactly the right thing under 10.6.8. Under 10.12, the main combo box renders correctly, green text on a black background, but the popup/dropdown is pure white, no text; it should be green on a mid-blue (127.) There's no selection color or visible reaction either, graphically, other than the correct (invisible) item being chosen and the popup menu going away.