Results 1 to 3 of 3

Thread: how i want flat Drop-down Button for ComboBox ?

  1. #1
    Join Date
    Jul 2010
    Location
    Ahmedabad,Gujarat,India
    Posts
    25
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default how i want flat Drop-down Button for ComboBox ?

    hi please help me with style sheet for combo box down buton...
    i need flat button please give me style sheet..
    Thank's...
    Attached Images Attached Images

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how i want flat Drop-down Button for ComboBox ?

    Try following style sheet, this is not perfect though you can give on shot to it.

    Qt Code:
    1. QComboBox::drop-down {
    2. subcontrol-origin: padding;
    3. subcontrol-position: top right;
    4. width: 15px;
    5.  
    6. border-left-width: 1px;
    7. border-left-color: darkgray;
    8. border-left-style: solid; /* just a single line */
    9. border-top-right-radius: 3px; /* same radius as the QComboBox */
    10. border-bottom-right-radius: 3px;
    11. }
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to yogeshgokul for this useful post:

    TheIndependentAquarius (3rd March 2012)

  4. #3
    Join Date
    Jul 2010
    Location
    Ahmedabad,Gujarat,India
    Posts
    25
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: how i want flat Drop-down Button for ComboBox ?

    Finally i done with style sheet like below:

    QComboBox::drop-down:button{
    background-color: rgb(234,234,234);
    }

    for all drop-down button like (QDateTime, QComboBox.....etc)
    *::drop-down:button{
    background-color: rgb(234,234,234);
    }

Similar Threads

  1. Drag/Drop on middle mouse button?
    By joeld42 in forum Qt Programming
    Replies: 0
    Last Post: 21st August 2010, 00:20
  2. Add close button in In Combobox item.
    By akram.halder in forum Qt Programming
    Replies: 2
    Last Post: 12th August 2010, 12:09
  3. make a flat QPushButton
    By harmodrew in forum Newbie
    Replies: 2
    Last Post: 6th August 2010, 16:46
  4. drag and drop button
    By dengbadeng in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2009, 09:36
  5. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.