Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38

Thread: Images/icons. It's not displayed

  1. #21
    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: Images/icons. It's not displayed

    No.
    Use QLabel::setPixmap.

  2. #22
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    Qt Code:
    1. qSpeed->setPixmap(QPixmap(":/images/image.png"));
    To copy to clipboard, switch view to plain text mode 
    no result.....:-\

  3. #23
    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: Images/icons. It's not displayed

    Are you sure that qSpeed is inside a proper layout?
    Try also qSpeed->setMinimumSize( pixmap.size() ).

  4. #24
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    Are you sure that qSpeed is inside a proper layout?
    Hm.. I'm just beginner, can you explain how to verify it?

  5. #25
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Images/icons. It's not displayed

    Quote Originally Posted by marcel View Post
    Are you sure that qSpeed is inside a proper layout?
    Try also qSpeed->setMinimumSize( pixmap.size() ).
    It's not needed. If "qSpeed" is a label and is given a pixmap, it's minimum size will be set to the size of pixmap.

    @LMZ: Could you provide a small compilable example that reproduces your problem? It might be easier for us to fix it then.

  6. #26
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    Hi guys! Sorry for that long pause... Well, I have create a small simple project. I made a form in a designer, designer was generate myform.h file. I put my pict within a disigner on a form. Picture are described in resources.. well, download it and take a look..
    Thx a lot! )
    URL

  7. #27
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Images/icons. It's not displayed

    Sorry, but could you use the attachment feature of the forum instead of using 3rd party commercial sites?

  8. #28
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    sure, sorry ))
    Attached Files Attached Files

  9. #29
    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: Images/icons. It's not displayed

    I bet this is because of the jpeg plugin. Have you tried loading a PNG instead? Just to see if it works.

    EDIT -I can see it also ( in designer )

  10. #30
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Images/icons. It's not displayed

    I can see the image. Could you again verify that PNG images don't work either?

  11. #31
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    Finally! An png image are displayed. Thanks a lot!
    Imediatly I tried to put on my label an animated gif. I add it to resorces, in projectdialog.cpp add code:
    Qt Code:
    1. QMovie *movie = new QMovie(":/new/prefix1/avatar.gif");
    2.  
    3. label->setMovie(movie);
    4. movie->start();
    To copy to clipboard, switch view to plain text mode 
    No result... What can be the problem know?

  12. #32
    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: Images/icons. It's not displayed

    Probably you did not compiled Qt with GIF support. Neither with jpeg support I assume.

  13. #33
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Images/icons. It's not displayed

    What files do you have in your plugins/imageformats directory under your Qt installation dir?

  14. #34
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    in plugins/imageformats are next files - libqjpeg1.a, libqmng1.a, libqsvg1.a and three dll's with the same names

  15. #35
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Images/icons. It's not displayed

    hmm... Those "1" seem suspicious.

  16. #36
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    should I download another dll's?

  17. #37
    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: Images/icons. It's not displayed

    No, try removing the "1" from those!

  18. #38
    Join Date
    May 2007
    Posts
    46
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Images/icons. It's not displayed

    hm, I don't think it's a good idea...take a look here..
    But I think, I'm sattisfied with using of png pictures.. Know I need to use gif animations..

Similar Threads

  1. Replies: 20
    Last Post: 15th August 2008, 23:19
  2. JPEG Image isn't displayed!?
    By GodOfWar in forum Qt Programming
    Replies: 9
    Last Post: 16th April 2007, 15:01
  3. QLineEdit - Float number not displayed correct
    By morty in forum Qt Programming
    Replies: 3
    Last Post: 9th November 2006, 00:47
  4. Replies: 6
    Last Post: 10th April 2006, 10:47

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.