Home > Mobile >  About the QDialog switching effect
About the QDialog switching effect

Time:04-26

,, can you tell me the two QDialog switch, how can you make it like the effect of mobile software switch similar?

CodePudding user response:

Set specific baidu animation

CodePudding user response:

reference 1/f, mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

CodePudding user response:

refer to the second floor lwei2 response:
Quote: refer to 1st floor mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

You have to know how to use Qt animation ah you have a look at how to use QPropertyAnimation


refer to the second floor lwei2 response:
Quote: refer to 1st floor mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

If you don't need animation just want to switch to another window?

refer to the second floor lwei2 response:
Quote: refer to 1st floor mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

It seems you don't need animation just want to switch to another window? The current window hide, show the new window

CodePudding user response:

reference mango black reply: 3/f
Quote: refer to the second floor lwei2 response:
Quote: refer to 1st floor mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

You have to know how to use Qt animation ah you have a look at how to use QPropertyAnimation


refer to the second floor lwei2 response:
Quote: refer to 1st floor mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

If you don't need animation just want to switch to another window?

refer to the second floor lwei2 response:
Quote: refer to 1st floor mango black response:
animate specific baidu
bosses, convenient for example?
For example
Public parentDlg: public QDialog
{}

Public subDlg: public QDialog
{}

By the switch to the parentDlg subDlg, I am so write

ParentDlg DLG.
DLG. SetModel (true);
Int res=DLG. The exec ();
If (res==QDialog: : Accepted)
{
SubDlg subDialog;
SubDialog. The show ();
}

How can I set the animation?

It seems you don't need animation just want to switch to another window? The current window hide, it is ok to show new window

Oh oh, thank you very much, I'll QPropertyAnimation see how about this, in fact, I also show or hide, but the project need to switch the window do shing to switch the android mobile phone application style,,,,,,, so, just ask,
  •  Tags:  
  • Qt
  • Related