Results 1 to 2 of 2

Thread: PictoGrams on Push Buttons instead of Text

  1. #1
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Red face PictoGrams on Push Buttons instead of Text

    Hi,

    I want to make a user interface with some buttons. But instead of texts on the buttons I want to have some Pictures. How can I make that?

    Thx
    no pain no gain

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: PictoGrams on Push Buttons instead of Text

    What kind of pictures, what format? Jpeg, png?
    I recommend going with png, since with jpeg you may have some problems (with the jpeg plugin, actually ).

    Anyway, you can set the image with QAbstractButton::setIcon and adjust it's size with QAbstractButon::setIconSize. You can also remove the text with setText("").

    Read furhter the description of QPushButton in Assistant.

    Regards

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

    Masih (19th May 2007)

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.