Results 1 to 10 of 10

Thread: no image displayed on QGraphicsView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: no image displayed on QGraphicsView

    How and where do you launch the application? In case you launch it from a debug/release subdir the image cannot be found in the current working directory.
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    sincnarf (4th October 2007)

  3. #2
    Join Date
    Apr 2007
    Posts
    117
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    84
    Thanked 1 Time in 1 Post

    Default Re: no image displayed on QGraphicsView

    Quote Originally Posted by jpn View Post
    How and where do you launch the application? In case you launch it from a debug/release subdir the image cannot be found in the current working directory.
    Thanks. I can't understand where I'll insert the codes in current working directory. How do I use this?

  4. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: no image displayed on QGraphicsView

    It is supposed to be placed anywhere after constructing the QApplication object, but you can of course simply launch the application from the directory containing the image too:
    C:\MyApp>release\app.exe
    instead of
    C:\MyApp\release>app.exe
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    sincnarf (3rd July 2007)

Similar Threads

  1. mouse tracking on image
    By vermarajeev in forum Qt Programming
    Replies: 14
    Last Post: 12th May 2010, 13:06
  2. JPEG Image isn't displayed!?
    By GodOfWar in forum Qt Programming
    Replies: 9
    Last Post: 16th April 2007, 15:01
  3. how i can add image in my toolbar
    By jyoti in forum Qt Tools
    Replies: 7
    Last Post: 19th December 2006, 14:39
  4. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36
  5. Question about updating an image on screen
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 19:01

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.