Results 1 to 8 of 8

Thread: Subclassing QMainWindow problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    3
    Thanks
    1

    Default Re: Subclassing QMainWindow problem

    Quote Originally Posted by roxton View Post
    Probably "spider3.jpg" is not "solidSnake.jpg"
    sorry... I meant spider3.jpg

    Quote Originally Posted by mcosta
    You forgot Q_INIT_RESOURCE in main.cpp
    I changed the source code, but the problem persists.

    Any other suggestions are welcome =]

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: Subclassing QMainWindow problem

    Cant guess problem from code.. seems ok.

    One thing,, is ur Qt built with jpeg support ? try some other ".PNG" or ".ico" instead of JPG and see if it works

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

    lerwys (28th April 2009)

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

    Talking Re: Subclassing QMainWindow problem

    Quote Originally Posted by aamer4yu View Post
    Cant guess problem from code.. seems ok.

    One thing,, is ur Qt built with jpeg support ? try some other ".PNG" or ".ico" instead of JPG and see if it works
    Thank you aamer4yu... I loaded an .PNG image and it woked perfectly!! How come I didn't tought anything like this?

    But why does my Qt does not support .jpg image format?

    Thank YOU!!!

  5. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: Subclassing QMainWindow problem

    But why does my Qt does not support .jpg image format?
    Because you didnt built Qt with that support !
    You need to pass "-qt-libjpeg" argument to configure.exe while configuring Qt. Read "configure -help "

  6. #5
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: Subclassing QMainWindow problem

    You can check the available image formats supported from your Qt version with QImageReader::supportedImageFormats ()
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Replies: 1
    Last Post: 30th December 2008, 14:28
  2. Very strange socket programming problem
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2008, 13:05
  3. deployment problem: msvc++ 2008 Express, Qt 4.4.3
    By vonCZ in forum Qt Programming
    Replies: 7
    Last Post: 10th November 2008, 15:38
  4. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 13:48
  5. Replies: 16
    Last Post: 7th March 2006, 16: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
  •  
Qt is a trademark of The Qt Company.