PDA

View Full Version : How to remove flickering in animation on Qt 5.5.0 with Mac OS X



bartarya.parul
10th November 2015, 07:30
I have to resize my widget on some animations bt it gives flickering while opening or closing the widget.I have tried several approaches in these last days like QTimeLine, QTimer::singleShot(),QStateMachine.I have seen by pausing the animation also.But it gave me no result.I am still receiving the flickering on Mac OS X.Please suggest me something about this.I will be so grateful to you all.
Thanks.

bartarya.parul
16th November 2015, 12:00
Please someone help me...I have not achieved any solution regarding the above stated problem related to flickering.It has been around 7 to 8 days putting effort on this.

anda_skoa
16th November 2015, 12:15
Do you only get this on OSX or also on other platforms?
Can you create a simple program that shows the problem?

Cheers,
_

bartarya.parul
16th November 2015, 12:42
I am facing this problem on Mac OSX only...it is running fine on Windows.I gives no fllickering on Windows at all.

...
connect(mWOWMaster.get(), SIGNAL(loggedIn(bool)), this, SLOT(OnSlotLoggedIn(bool)));//on getting object mWoWMaster into existence, i have to call this slot OnSlotLoggedIn(bool)


void CMainWindow::OnSlotLoggedIn(bool status){
mcpushBtnLogin->setText(tr("Login"));

if (status) {

mcLineEditRoomCode->clear();
//buildStateMachine();I tried animation by QStateMachine

QPropertyAnimation *mainwindowanimate = new QPropertyAnimation(this,"geometry");
mainwindowanimate->setDuration(400);
mainwindowanimate->setStartValue(QRect(this->x(), this->y(), 569, 400));
mainwindowanimate->setEndValue(QRect(this->x(), this->y(), 569, 0));
mainwindowanimate->start(QPropertyAnimation::DeleteWhenStopped);

connect(mainwindowanimate, SIGNAL(finished()), this,SLOT(animationFinished()));
}
}



void CMainWindow::animationFinished(){

mwidgetLogin->setHidden(TRUE);
mWidgetAfterLogin->setHidden(FALSE);
QPropertyAnimation *mainwindowglow = new QPropertyAnimation(this, "geometry");
mainwindowglow->setDuration(200);
mainwindowglow->setStartValue(QRect(this->x(), this->y(), 569, 0));
mainwindowglow->setEndValue(QRect(this->x(), this->y(), 569, 86));
if (mWOWMaster->mbIsWindowsGatweay==true) {
connect(mainwindowglow, SIGNAL(finished()), this,SLOT(SlotAnimationForGatewayAtLogin()));
}

mainwindowglow->start(QPropertyAnimation::DeleteWhenStopped);


}
...
Thanks

bartarya.parul
17th November 2015, 09:16
Please someone reply...

anda_skoa
17th November 2015, 10:27
As I've said before: attach an example program that has the problem.

Cheers,
_

bartarya.parul
18th November 2015, 04:29
thx for reply..but i have sent the example code in one of my replies..It contains a slot in which i am resizing my widget with QPropertyAnimation and on animation
's signal finished() i am again resize the widget with QPropertyAnimation.This means I have to resize my widget two times....so flickering is occurring while resizing the widget. You can easily read the code.

Thanks.

anda_skoa
18th November 2015, 08:18
thx for reply..but i have sent the example code in one of my replies

That reply must have been lost.

I can see only a bit of code in comment #4 but that doesn't look like it would compile and run if copied into a file.

Can you check which comment contains the build and runnable example you've uploaded? Maybe you posted it to a different thread?

Cheers,
_

bartarya.parul
19th November 2015, 05:30
Actually this is the entire pseudo code which i have written.Nothing has been lost.please read only QPropertyAnimation statements then you would understand ow it is doing.The main Widget is not opaque and some background(The window which is opened at the background) is shown while running the application.
I have used setAttribute(Qt::WidgetAttribute) also but it is not working.
Thanks.

anda_skoa
19th November 2015, 08:28
Actually this is the entire pseudo code which i have written.Nothing has been lost.

Well, ok.
We will see of anyone has the inclination of building a test program themselves.
I highly doubt it but you never know.

Cheers,
_

bartarya.parul
19th November 2015, 09:06
Thanks ...anda_skoa...I have used Q_PROPERTY also on myWidget->height().bt all in Vain...I have used many setAttributes and mac specific attributes also...bt nothing is going...If you have some clue about it ,then please notify me ASAP.
Thanks...