Results 1 to 2 of 2

Thread: Bitmap buttons

  1. #1

    Smile Bitmap buttons

    Hello,

    I'm new at QT, installed it couple hours ago and now i'm trying to figure out how to make custom buttons. I mean i want to put a bitmap texture on a button and i can't seem to figure out how its done. It's prolly told somewhere in help file but i just can't find it

    How about buttons that are different shapes than a box, how are those done?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bitmap buttons

    General answer is "it depends on what you exactly want to achieve". In the simplest case you might just want to set an icon for the button (for example using QAbstractButton::setIcon() and making the button flat through the flat property). If you want something more complicated, you might need to subclass QPushButton or QToolButton and override its paintEvent.

Similar Threads

  1. array of radio buttons
    By amulya in forum Qt Programming
    Replies: 4
    Last Post: 5th October 2006, 12:59
  2. widget for text AND buttons
    By nongentesimus in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 13:43
  3. Replies: 9
    Last Post: 9th May 2006, 19:53
  4. How to get larger radio buttons on XP?
    By Ben.Hines in forum Qt Programming
    Replies: 9
    Last Post: 24th April 2006, 19:00
  5. Several buttons
    By Mariane in forum Newbie
    Replies: 4
    Last Post: 15th March 2006, 20:50

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.