Results 1 to 4 of 4

Thread: problem with styleSheet for QDateEdit

  1. #1
    Join Date
    May 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default problem with styleSheet for QDateEdit

    Hi everyone. Firstly, I want apologize for my bad english.
    I'v got a problem with design for my QDateEdit.
    Qt Code:
    1. border: 1px solid gray;
    2. border-radius: 2px;
    3. background: white;
    4. selection-background-color: lightblue;
    5. };
    To copy to clipboard, switch view to plain text mode 
    That's the current style, and it looks bad, because of ugly buttons for increment/decrement.
    Now it looks like:
    1.PNG

    I tried to correct buttons, set the border-style: none, background is none, either. Here is problem:
    2.PNG
    Buttons are dissapeared. I don't know, what I have to do, I want to see only arrows, no borders, no backgrounds, no any mention of the buttons. In fact, there are no any buttons, as I want, but there are no arrows, either, and that's is problem.
    Once again, I apologize for my english.

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: problem with styleSheet for QDateEdit

    You want buttons having only arrows right?

    I think you are right about playing with buttons.

    Keep setting border as none and set a background-image(prepare a png or jpg image with an arrow on it).

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

    DarthRamone (8th May 2012)

  4. #3
    Join Date
    May 2012
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with styleSheet for QDateEdit

    You want buttons having only arrows right?
    Yep
    Keep setting border as none and set a background-image(prepare a png or jpg image with an arrow on it).
    Oh... Wait a minute. As far as I understand your answer, the arrow on the button on QSpinBox, QDateEdit and so on, it's only background-image, not a symbol? It explains everything, in particular: it's explains why the buttons are disappeared when I'm trying to set transparent background. I thought that background will be transparent, and a arrow-symbol will be visible.
    Thanks a lot! Tomorrow I'll try. I'm too tired to launch ide =) Thanks!

  5. #4
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: problem with styleSheet for QDateEdit

    They are all cosmetic stuff. Hope that works!

Similar Threads

  1. Replies: 2
    Last Post: 21st January 2011, 09:05
  2. Replies: 1
    Last Post: 3rd May 2010, 09:25
  3. QDateEdit emiting signal problem
    By anafor2004 in forum Newbie
    Replies: 1
    Last Post: 17th June 2008, 07:59
  4. Replies: 0
    Last Post: 2nd May 2007, 10:53
  5. Problem with receiving events from QDateEdit
    By gunhelstr in forum Qt Programming
    Replies: 4
    Last Post: 20th April 2006, 11:21

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.