Qt + i.MX53: Linear gradient not working satisfactorily

Discussion created by Rooney on Dec 15, 2011



I'm running a Qt application on the i.MX53 + 10.1" LVDS display. For styling purpose I use a qlineargradient.


QTreeView {
    color: #F0F0F0;
    font-family: MS Shell Dlg 2;
    font-size: 14px;
    font-weight: bold;
    background-color: #B9B9B9;
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 #A9A9A9, stop: 1 #C9C9C9);
    border: 1px solid black;
    selection-background-color: transparent;
    border-image: none;


Unfortunately the gradient steps are very distinctiv (see attachment). The second attachment shows the same content on a PC using 32bit graphic.

The LVDS display uses RGB666, so only 18bit is possible.

Is there a way to use qlineargradient that results in same appereance as on the PC? The application would look very simple, if gradients cannot be used.


Thanks für your help!!