Results 1 to 2 of 2

Thread: custom widgets painting image formats

  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany.
    Posts
    111
    Thanks
    29
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default custom widgets painting image formats

    Hello all,

    I'd like to make a widget - something like the shaped clock example. Instead of drawing the thing 'by hand' I'd like to use some image - perhaps even from a photograph (whatever).

    What's the image format to use?
    I'd like scalability, too. I'll also be doing some very simple animation (rotating and changing colours).
    Do I embed the image into a resource (I don't know anything about using them) or is it ok to load it from a file?

    you guys are a great help, thanks,
    K

  2. #2
    Join Date
    Jul 2006
    Location
    Poprad/Prague
    Posts
    33
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: custom widgets painting image formats

    Just some of my thoughts:

    If you want scalability, you probably won't be satisfied with a photograph... Unless you have it in good resolution and use QPainter::SmoothPixmapTransform, but even though I think that the 'numbers' would not look very good.
    I would probably draw the clock in a small app on a QPicture (using various shapes) and save it then (as done here). You can then use and load the QPicture easily in your clock application and resize it without loosing quality...

Similar Threads

  1. create custom widgets
    By nimmyj in forum General Discussion
    Replies: 1
    Last Post: 20th November 2006, 08:24
  2. Global includes with designer custom widgets
    By mab in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2006, 22:06
  3. Loading a custom image into a QPixmap
    By KShots in forum Qt Programming
    Replies: 12
    Last Post: 5th August 2006, 00:16
  4. container populated with custom widgets
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 16th April 2006, 21:02
  5. image for a custom menu Item.......
    By Naveen in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2006, 09:28

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.