i'm doing exactly what you do in your example code...
No matter where i call exec() the result is the same. Flashing. It seems that the dialog draws it self just like it was when it was hidden... and then refreshes... weird :/
void Dlg
::initImport(QString &path
) {
m_filepath = path;
setDefaults();
update();
exec();
}
void Dlg::setDefaults()
{
m_probar->setValue(0);
m_importButton->setEnabled(true);
m_cancelButton->setEnabled(true);
}
void Dlg::accept()
{
m_importButton->setEnabled(false);
m_cancelButton->setEnabled(false);
m_probar->setValue(100);
hide();
}
void Dlg::reject()
{
clearData();
hide();
}
void Dlg::initImport(QString &path)
{
m_filepath = path;
setDefaults();
update();
exec();
}
void Dlg::setDefaults()
{
m_probar->setValue(0);
m_importButton->setEnabled(true);
m_cancelButton->setEnabled(true);
}
void Dlg::accept()
{
m_importButton->setEnabled(false);
m_cancelButton->setEnabled(false);
m_probar->setValue(100);
hide();
}
void Dlg::reject()
{
clearData();
hide();
}
To copy to clipboard, switch view to plain text mode
Bookmarks