Solved How to splash screen a gif video
-
- QLabel *processLabel = new QLabel(NULL); ?
Yes. will make it window.'
Yes, it should be.
Just dont call w.show() before u want to. - QLabel *processLabel = new QLabel(NULL); ?
-
QTimer::singleShot(5000,movie,SLOT(stop()));
QTimer::singleShot(2500,&w,SLOT(show()));this is what i use but this gif is not displaying now . Now it directly comes to the mainwindow but after the timeout which i have given in that QTimer
-
@mrjj
Now This is my code in Main.cpp
QMovie *movie = new QMovie("C:/Users/data/Documents/untitled14/200w.gif");
QLabel *processLabel = new QLabel(NULL);
processLabel->setMovie(movie);
movie->start();QTimer::singleShot(2500,movie,SLOT(stop())); QTimer::singleShot(2500,&w,SLOT(show()));
-
@ManiRon
maybe u need processLabel->show(); -
Now its showing sir,
But is there anyway to make show it in a different way -
@mrjj those maximize and minimize and that close options should not be displayed. only the gif video and the background should be like a hide out one . Donno how to explain it
-
@mrjj while installing an application an pop up will come in which it blurs the background portion and only that pop up will be displayed to select yes or no . In that manner i want the loading gif video should be displayed . Is there any way possible ?
-
@mrjj is there any way sir?
-
@ManiRon
hi
Yes, you can remove the decorations.
https://stackoverflow.com/questions/3948441/how-to-remove-the-window-border-containing-minimize-maximize-and-close-buttons -
@mrjj itsworking sir,
Now i want to align the gif video to play at the centre of the screen.
QLayout *data = new QLayout;
data->alignment(Qt::AlignCenter);
QLabel *processLabel = new QLabel(NULL);
processLabel->setLayout(data);but it showed error . Note : these i am using it in main.cpp
-
@mrjj I found it sir,
i used
QLabel *processLabel = new QLabel(NULL);
processLabel->setAlignment(Qt::AlignCenter);Now my doubt is , Its not aligning at all.
-
This post is deleted! -
@ManiRon
HI
Thats the internal aligment :)I assume you mean to center window onthe screen / desktop
https://wiki.qt.io/How_to_Center_a_Window_on_the_Screen -
@mrjj its coming like this when i use code from the above mentioned link
-
@ManiRon
you do that on label ?anyway, you should set both alignments so movie is in center
-
This is my code
processLabel->setGeometry(
QStyle::alignedRect(
Qt::LeftToRight,
Qt::AlignCenter,
processLabel->size(),
qApp->desktop()->availableGeometry() -
@ManiRon
ok.
well u need to center the movie also or
set size of label to size of movie. -
i have to do both sir .
-
@ManiRon
well to be on safe size u can do that.
use resize to size label to width, height of movie -
@mrjj not getting your point