Results 1 to 2 of 2

Thread: QComboBox drop down button outside combo box frame

  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QComboBox drop down button outside combo box frame

    Hi All,

    I'm trying to go outside combo box frame with this (see below) CSS Qt style sheet code.

    combo-box-trouble.png

    All success except padding, you can see it on picture ( figure 3 ).

    Any suggestion ?
    Thank you

    p.s
    How to reproduce: http://pastebin.com/4ZiYRUmB

    Qt Code:
    1. QComboBox#tab_combo {
    2. margin: 0 26px 0 0; /* make room for the arrow */
    3. padding: 2px 1px 2px 1px;
    4. min-width: 19px;
    5. min-height: 14px;
    6. max-height: 14px;
    7. width: 40px;
    8. height: 14px;
    9. //...strip
    10. }
    11. QComboBox#tab_combo::drop-down {
    12. subcontrol-origin: margin;
    13. subcontrol-position: center right;
    14.  
    15. width: 19px;
    16. min-width: 19px;
    17. max-width: 19px;
    18.  
    19. height: 14px;
    20. min-height: 14px;
    21. padding: 0;
    22. margin: 0;
    23.  
    24. border: 1 solid #515151;
    25. }
    26.  
    27. QComboBox#tab_combo::down-arrow {
    28. image: url(:/combo_arrow.png);
    29.  
    30. min-width: 19px;
    31. max-width: 19px;
    32. width: 19px;
    33.  
    34. min-height: 14px;
    35. max-height: 14px;
    36. height: 14px;
    37. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QComboBox drop down button outside combo box frame

    I have found workaround:

    Qt Code:
    1. padding: 2 -19px 2 1;
    2. width: 59px;
    To copy to clipboard, switch view to plain text mode 

    If somebody knows better solution do not hesitate write down it here

Similar Threads

  1. Replies: 1
    Last Post: 29th June 2010, 17:59
  2. How to drag and drop on QGraphicsView frame
    By wudelei in forum Qt Programming
    Replies: 1
    Last Post: 16th April 2010, 08:04
  3. Focus frame inside QComboBox list
    By alpinista in forum Qt Programming
    Replies: 2
    Last Post: 13th November 2009, 14:30
  4. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25
  5. Replies: 2
    Last Post: 17th July 2006, 14:52

Tags for this Thread

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.