QComboBox: shadow effect of drop-down/popup removable?



  • Hi guys,

    I would like to remove the shadow effect of a QComboBox' drop-down / popup, but nothing worked yet.

    Setting the combo box a different style via

    myComboBox->setStyle(QStyleFactory::create("Windows"));
    

    was not successful. The available styles on my MS Windows 7 machine are "Windows", "WindowsXP", "WindowsVista" and "Fusion" - I tried them all.

    I am using Qt 5.5.1.

    Any ideas?
    A CSS solution would be superior, but I am grateful for any suggestion.
    Thanks in advance!


  • Moderators

    @PatrickS
    this a platform feature. Windows (or at least Qt under Windows) adds it for popup windows.
    Try this pls (before showing the popup):

    comboBox->view()->window()->setWindowFlags( Qt::Popup | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint );
    


  • Great, that worked! Thank you very much!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.