Results 1 to 5 of 5

Thread: QDateEdit down arrow frame

  1. #1
    Join Date
    Dec 2013
    Location
    Colorado
    Posts
    45
    Thanks
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Question QDateEdit down arrow frame

    This DateEdit is OK except for the rectangular frame around the down arrow.
    Any way to eliminate or change the shape of the frame?

    DateTime.png
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QDateEdit down arrow frame

    I assume you are using style sheets (to make user's eye bleed with the red). QDateEdit is styled the same way as QSpinBox.
    The down button and arrow can be styled using the ::down-button and ::down-arrow subcontrols. By default, the down-button is placed in the bottom right corner in the Padding rectangle of the widget. Without an explicit size, it occupies half the height of its reference rectangle. The bottom-arrow is placed in the center of the Contents rectangle of the bottom-button.

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

    Henry Blue Heeler (14th January 2014)

  4. #3
    Join Date
    Dec 2013
    Location
    Colorado
    Posts
    45
    Thanks
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: QDateEdit down arrow frame

    Quote Originally Posted by ChrisW67 View Post
    I assume you are using style sheets (to make user's eye bleed with the red). QDateEdit is styled the same way as QSpinBox.
    Red was the client's request. Go figure.
    I'm just gonna dig into the QSpinBox source code to ascertain what I can modify vis-a-vis the down-button.
    down-button width: does nothing. Can't even set the height. Boo freaking hoo, I'll get over this limitation.
    Ta.

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QDateEdit down arrow frame

    On second inspection that will style the up/down control when the date edit does not have a popup calendar. The button controlling the popup calendar is styled like the QComboBox drop-down sub-control. This give some control:
    Qt Code:
    1. border: 1px solid gray;
    2. border-radius: 3px;
    3. padding: 1px 18px 1px 3px;
    4. min-width: 6em;
    5. }
    6. QDateEdit::drop-down {
    7. subcontrol-origin: padding;
    8. subcontrol-position: top right;
    9. width: 15px;
    10. border-left-width: 1px;
    11. border-left-color: red;
    12. border-left-style: solid;
    13. border-top-right-radius: 3px;
    14. border-bottom-right-radius: 3px;
    15. }
    16. )
    To copy to clipboard, switch view to plain text mode 

  6. The following user says thank you to ChrisW67 for this useful post:

    Henry Blue Heeler (15th January 2014)

  7. #5
    Join Date
    Dec 2013
    Location
    Colorado
    Posts
    45
    Thanks
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: QDateEdit down arrow frame

    You need to have an image to modify, e.g.

    image: url(:/down-arrow.png);

    No worries, thanks for the suggestions. I presently have more pressing issues.
    I'll post what I discover.

    Cheers!

Similar Threads

  1. Replies: 1
    Last Post: 5th December 2013, 06:46
  2. Frame-by-frame event handling?
    By QTNovice in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2013, 22:32
  3. Video Parsing - Frame by Frame
    By ctote in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2010, 18:30
  4. Previous frame inner to this frame(corrupt stack?)
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 28th May 2007, 01:35
  5. Previous frame inner to this frame(corrupt stack?)
    By coralbird in forum Qt Programming
    Replies: 17
    Last Post: 29th April 2006, 01:42

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
  •  
Qt is a trademark of The Qt Company.