×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Thumbs down black screen before displaying image in n900

    IN n900 ,before displaying an image it comes with black screen first.Is it related to os.While displaying that same image from root mode.It comes in white background before displaying it.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    Are you talking about displaying image by which means?

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    simply by double click from filemanager.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    Ok, you are talking about themeing of image viewer application. What is root mode and how is it related to Qt?

  5. #5
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    I am using QImage to load an image.So while displaying an image the background comes black and then the image displays.I have seen normally while opening an image in n900,it comes black background first.Same thing while displaying the image in my application from root user the background comes white and then display the image.Is it related to OS .

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    Quote Originally Posted by babulamiet View Post
    I am using QImage to load an image.So while displaying an image the background comes black and then the image displays.I have seen normally while opening an image in n900,it comes black background first.Same thing while displaying the image in my application from root user the background comes white and then display the image.Is it related to OS .
    You never run applications as root. Styles are used to change appearance of your application: http://doc.trolltech.com/4.6/stylesheet.html

  7. #7
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    Normally if we open a image by image-viewer application in n900,then the image will display after a black screen.I think it is related to OS.So the same is happen when I am loading an image using Qimage.Is it the theme of n900 that before displaying an image it will display black screen first.You can check it in your n900 device by opening an image by image viewer application .Can this theming of imageviwer application change.I need a white screen should display instead of this black screen before displaying the actual image.
    Last edited by babulamiet; 2010-04-05 at 08:23.

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    Quote Originally Posted by babulamiet View Post
    Normally if we open a image by image-viewer application in n900,then the image will display after a black screen.I think it is related to OS.So the same is happen when I am loading an image using Qimage.Is it the theme of n900 that before displaying an image it will display black screen first.You can check it in your n900 device by opening an image by image viewer application .Can this theming of imageviwer application change.I need a white screen should display instead of this black screen before displaying the actual image.
    Image Viewer is Gtk2 application and black background is in it's themes. Qt has it's own themes, but it also search and apply Gtk2 themes to match look and feel. As I said before, you can change appearance of your application using stylesheets. However, white background will look at least ugly. Alternatively you can try to run your app with "-style windows" to see your application with white background.

  9. #9
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    thank u for your help.

  10. #10
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    -style window is giving white background it is not transparent.While displaying a gif image it is ok .but i am playing it by using Qmovie ,then the background is not transparent.
    Last edited by babulamiet; 2010-04-16 at 09:18.

  11. #11
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    Try changing opacity of the window
    http://qt.nokia.com/doc/4.6/qwidget....owOpacity-prop

  12. #12
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    when i am playing the gif image by Qmovie ,i need the image background to be white/transparent ,it is not coming white/transparent(actual image backgrond is transparent background).So I have used setBackgroundColor() to make it white background,but its not working .The background image is coming not white its some what like white.I need clear white colour for the image background.I used setwindowopacity() ,but have not seen any effect while playing it using Qmovie.(Before just playing the gif file ,the image background is white but after while it is not white until playing )

  13. #13
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    Quote Originally Posted by babulamiet View Post
    when i am playing the gif image by Qmovie ,i need the image background to be white/transparent ,it is not coming white/transparent(actual image backgrond is transparent background).So I have used setBackgroundColor() to make it white background,but its not working .The background image is coming not white its some what like white.I need clear white colour for the image background.I used setwindowopacity() ,but have not seen any effect while playing it using Qmovie.(Before just playing the gif file ,the image background is white but after while it is not white until playing )
    Could you please attach small sample application and sample gif image?

  14. #14
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: black screen before displaying image in n900

    void displayimage::startTimer()
    {

    label->setMovie(movie);
    movie->setFileName("/etc/node/eggtimer.gif");

    //movie->setBackgroundColor(qColor);

    if(_screenSize.width() != 0 && _screenSize.height() != 0)
    label->setGeometry(_screenSize.width()/2-50, _screenSize.height()/2-35, 90, 90);
    else
    label->setGeometry(350,205, 90, 90);

    movie->start();

    }

    void displayimage::stopTimer()
    {
    //QColor qColor(255,255,255,255);//by sahoo for test
    //movie->setBackgroundColor(qColor);//by sahoo for test
    movie->stop();
    label->clear();
    }




    I am using above code to play a gif file.But at time of playing i need the background transparent.It is a transparent image also.
    Last edited by babulamiet; 2010-04-19 at 12:35.

  15. #15
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: black screen before displaying image in n900

    This is my test application
    Code:
    #include <QtGui>
    
    int main (int argc, char **argv)
    {
        QApplication app(argc, argv);
        app.setStyleSheet("QLabel { background-color: white }");
    
        QLabel label;
        QMovie *movie = new QMovie("star.gif");
    
        label.setMovie(movie);
    #ifndef Q_WS_MAEMO_5
        label.resize(400, 400);
    #endif
        label.show();
        movie->start();
    
        return app.exec();
    }
    I do not attach test GIF image (star.gif) since you did the same.

Similar Threads

  1. Displaying one image on top of another image in J2ME
    By amishra in forum Mobile Java General
    Replies: 13
    Last Post: 2008-11-17, 08:35
  2. Image on Screen....
    By sunil304047 in forum Symbian
    Replies: 4
    Last Post: 2008-11-06, 06:10
  3. Replies: 5
    Last Post: 2008-09-26, 15:21
  4. using DirectGraphics > quitting > black screen
    By flomef in forum Mobile Java General
    Replies: 4
    Last Post: 2006-03-03, 13:52
  5. Is screen capture image making possible?
    By MobileVisuals in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2005-04-08, 12:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×