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.
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.
Are you talking about displaying image by which means?
Ok, you are talking about themeing of image viewer application. What is root mode and how is it related to Qt?
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
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.
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.
-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.
Try changing opacity of the window
http://qt.nokia.com/doc/4.6/qwidget....owOpacity-prop
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 )
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.
This is my test application
I do not attach test GIF image (star.gif) since you did the same.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(); }