Results 1 to 4 of 4

Thread: Qt3 : How to set the background??

  1. #1
    Join Date
    Apr 2011
    Location
    China
    Posts
    8
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Qt3 : How to set the background??

    there are much fewer functions be used to set background than qt4 .

    Qt Code:
    1. playWidget->setPaletteBackgroundPixmap(QPixmap(":/images/background.png"));
    2. playWidget->show();
    To copy to clipboard, switch view to plain text mode 

    these codes were lost on the widget!

    nobody? i just want to paint a picture on a widget named by playWidget under the environment of qt3!
    Last edited by wysota; 8th April 2011 at 10:30.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qt3 : How to set the background??

    nobody? i just want to paint a picture on a widget named by playWidget under the environment of qt3!
    Easy, I'm sure someone will help you. Please note the time difference, many users of this forum are from Europe, so they were probably sleeping while you posted your first post (as it was posted ~3:00 - 4:00 local time here).
    As for the question, have you tried to reimplement paintEvent and draw the pixmap there ? I've never used Qt3, but I think paintEvent was available there (please correct me if I'm wrong).

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

    Kunkka (18th April 2011)

  4. #3
    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: Qt3 : How to set the background??

    What's the base class of playWidget?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #4
    Join Date
    Apr 2011
    Location
    China
    Posts
    8
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt3 : How to set the background??

    Please note the time difference, many users of this forum are from Europe, so they were probably sleeping while you posted your first post (as it was posted ~3:00 - 4:00 local time here).
    haha...  i very much appreciated that you reminded me . i was impatient of all this waiting.
    now i know how to set the background, Thank you.

Similar Threads

  1. Replies: 0
    Last Post: 5th April 2011, 13:36
  2. Replies: 1
    Last Post: 25th June 2010, 18:31
  3. How to set background
    By zbliujia in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2009, 05:18
  4. Running my app in the background
    By srohit24 in forum Qt Programming
    Replies: 2
    Last Post: 22nd May 2009, 23:15
  5. How to get background pixmap?
    By philipp1 in forum Qt Programming
    Replies: 2
    Last Post: 4th November 2006, 08:44

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.