Results 1 to 5 of 5

Thread: Need help to design push button

  1. #1
    Join Date
    Feb 2011
    Posts
    29
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Smile Need help to design push button

    Hi Friends.

    I am currently facing problem to change radius of push button...
    I have read document for style sheet of push button. There is one line to change push button radius.

    but i want button whose three sides are curvature and one corner is flat.

    but when i set radius it sets radius of all four corners.

    So please if any body knows let me is it possible to change only one corner of pushbutton...

    Please help me in this matter.

    Thanks in advance.

    Regards,
    Keyur Parekh

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help to design push button

    Perhaps a picture would help us understand what you want?

  3. #3
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Need help to design push button

    You will likely have to do this yourself, perhaps with an image and an image mask, or possibly with a custom paint routine.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Need help to design push button

    I think he wants one corner to stay sharp, while the other three should be rounded.

    Have a look at the style sheet documentation.
    You can use border-top-left-radius, border-top-right-radius ect, to control each corners radius.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Feb 2011
    Posts
    29
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: Need help to design push button

    Hi friends

    I have attach file.. in that push button drawing has given...
    so i want to make push button exactly same shape....
    please help me in that matter.


    Added after 8 minutes:


    thanks so much for help........
    i have done it..........
    i have done with border-top-left-radius option...
    thanks once again for help........
    Attached Images Attached Images
    Last edited by keyurparekh; 29th March 2011 at 13:39.

Similar Threads

  1. Push Button with image?
    By steve.bush in forum Newbie
    Replies: 10
    Last Post: 18th March 2011, 06:48
  2. Bitmap on Push Button in QT 3
    By Gokulnath in forum Newbie
    Replies: 2
    Last Post: 12th January 2011, 07:34
  3. [QT]Push button-no action
    By nqn in forum Newbie
    Replies: 4
    Last Post: 30th May 2010, 19:08
  4. shape of push button
    By Seema Rao in forum Qt Programming
    Replies: 23
    Last Post: 2nd April 2008, 01:05
  5. Push Button problem!!
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2006, 16:31

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.