Results 1 to 3 of 3

Thread: How to make automatically resizeable background-image

  1. #1
    Join Date
    Oct 2009
    Posts
    4
    Thanks
    1

    Default How to make automatically resizeable background-image

    I have background-image in my mainwindow. And now, when I call w.showFullScreen(); i want to show this image in fullscreen, no in fixed size.. Any ideas ?

  2. #2
    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: How to make automatically resizeable background-image

    It depends how you implemented your backgroud.
    Is it a QLabel, or is it a QBrush, a QPixmap perhaps?

    Can you show the relevant code?
    ==========================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.

  3. #3
    Join Date
    Oct 2009
    Posts
    4
    Thanks
    1

    Default Re: How to make automatically resizeable background-image

    I use Style Sheet..,
    Qt Code:
    1. {
    2. background-image: url(:/images/debug/foto.jpg)
    3. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 3
    Last Post: 18th May 2012, 10:12
  2. Adding image in background
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 6
    Last Post: 9th August 2009, 16:39
  3. QCalendarWidget background image
    By khcbabu in forum Newbie
    Replies: 0
    Last Post: 31st March 2009, 12:51
  4. How to stretch background image used in brush-palette
    By Hookem in forum Qt Programming
    Replies: 5
    Last Post: 24th December 2008, 17:03
  5. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.