Hey @all,
in my client application i have a connection dialog where i can enter the username, passwort, hostname, port. Now i will have an Advanced Button, and by clicking of them the four fields are shown. When i click once more on the button, the four fields must hide.
if have implement it as follows, (Drawings):
this
->auth_dlg
->layout
()->setSizeConstraint
(QLayout::SetFixedSize);
this->auth_dlg->layout()->setSizeConstraint(QLayout::SetFixedSize);
To copy to clipboard, switch view to plain text mode
And in the slot for the Advanced Button I have:
if(this->is_advanced) {
this->is_advanced = false;
}
else if(!this->is_advanced) {
this->is_advanced = true;
}
auth_dlg_lServer->setVisible(this->is_advanced);
auth_dlg_lPort->setVisible(this->is_advanced);
auth_dlg_lUsername->setVisible(this->is_advanced);
auth_dlg_lPassword->setVisible(this->is_advanced);
auth_dlg_leServer->setVisible(this->is_advanced);
auth_dlg_lePort->setVisible(this->is_advanced);
auth_dlg_leUsername->setVisible(this->is_advanced);
auth_dlg_lePassword->setVisible(this->is_advanced);
if(this->is_advanced) {
this->is_advanced = false;
}
else if(!this->is_advanced) {
this->is_advanced = true;
}
auth_dlg_lServer->setVisible(this->is_advanced);
auth_dlg_lPort->setVisible(this->is_advanced);
auth_dlg_lUsername->setVisible(this->is_advanced);
auth_dlg_lPassword->setVisible(this->is_advanced);
auth_dlg_leServer->setVisible(this->is_advanced);
auth_dlg_lePort->setVisible(this->is_advanced);
auth_dlg_leUsername->setVisible(this->is_advanced);
auth_dlg_lePassword->setVisible(this->is_advanced);
To copy to clipboard, switch view to plain text mode
So my problem now is when the fields are shown/hided, it takes a few seconds (1 - 3). How can i do it faster?
Regards
NoRulez
Bookmarks