Results 1 to 19 of 19

Thread: How to create a custom Button?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: How to create a custom Button?

    Quote Originally Posted by wysota View Post
    It's not an improper example - you simply don't like it.
    It's just unnecessarily inefficient.

  2. #2
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 8 Times in 5 Posts

    Default Re: How to create a custom Button?

    I've been playing around with the new stylesheet thing and it makes everything much simpler. (The below is a stylesheet, not c++)
    Qt Code:
    1. QCheckBox::indicator:unchecked {
    2. image: url(:/images/checkbox_unchecked.png);
    3. }
    4.  
    5. QCheckBox::indicator:checked {
    6. image: url(:/images/checkbox_checked.png);
    7. }
    To copy to clipboard, switch view to plain text mode 

    This is implemented with qApp->setStyleSheet() globally or with myCheckbox->setStyleSheet() for a particular checkbox. Also, check out the Style Sheet Example

Similar Threads

  1. Create a new button
    By avis_phoenix in forum Qt Programming
    Replies: 7
    Last Post: 3rd September 2006, 19:56
  2. How to create an Insert/Submit button for a form.
    By fnmblot in forum Qt Programming
    Replies: 5
    Last Post: 4th August 2006, 17:18
  3. Example HowTo create custom view
    By dexjam in forum Newbie
    Replies: 6
    Last Post: 12th July 2006, 12:06
  4. custom maximize button---
    By Naveen in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 14:11
  5. How to create custom slot in Qt Designer 4.1?
    By jamadagni in forum Qt Tools
    Replies: 31
    Last Post: 18th January 2006, 21:46

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.