Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QComboBox: shadow effect of drop-down/popup removable?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PatrickS
    wrote on last edited by
    #1

    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!

    raven-worxR 1 Reply Last reply
    0
    • P PatrickS

      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!

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @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 );
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      5
      • P Offline
        P Offline
        PatrickS
        wrote on last edited by
        #3

        Great, that worked! Thank you very much!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved