Recently I came to SO in this question asking how could I get my hands on a QComboBox' QScrollBar in order to change its thickness. After reading the replies, I tried Marco A. solution for my Qt Embedded application and it didn't worked. Then, for test, I changed the compilation environment to Desktop and the fix worked!
So essentially my problem is that when I try to change a QComboBox's QScrollBar width in Qt for Embedded Linux (ARM), nothing happens, but if I compile the exact same code for Qt for Desktop, it works. The following is the code I'm using for tests:
QAbstractItemView* poView = ui->comboBox->view();
QScrollBar* poBar = poView->verticalScrollBar();
poBar->setStyleSheet("width: 50px;");
and there is another code that does the same, but shows the same problem:
ui->comboBox->setStyleSheet("QScrollBar:vertical { width: 50px; }");
With comboBox
being declared in the ui form in Qt Designer (inside Qt Creator).
Qt versions are the same for Desktop and Qt for Embedded Linux (4.8.5). Another thing I found strange (but should have nothing to do with it) is that compiling the same code again for Desktop shows a QComboBox with a Windows XP style, while for Embedded the Plastique style is used (I notice that quite clearly due to Plastique showing three instead of two buttons to scroll the scroll bar).
So what could be happening? How may I solve this problem?