
Originally Posted by
marcel
For QWidget try setWindowFlags( Qt::Widget | Qt::WindowStaysOnTopHint ).
By the way, whay aren't you using a QSplashScreen? You have the drawContents function in which you can custom draw and make it look just as the dialog is looking now.
O ye.. i say that is possibel to draw on QSplashScreen ... to display progress bar inside QSplashScreen and signal and minimal time to stay open .....
To make all this or subclass QSplashScreen is easy make a QWidget from zero...
The problem on QSplashScreen is the minimal time to display ... whitout a QThread...
on main.cpp void i start :
Gui_Main *w = new Gui_Main();
w->setWindowTitle( _PROGRAM_TITLE_ );
w->hide();
Gui_Main *w = new Gui_Main();
w->setWindowTitle( _PROGRAM_TITLE_ );
w->hide();
To copy to clipboard, switch view to plain text mode
if mysql is connect or timeout Gui_Main is show.. the effect is same as QSplashScreen and i can display on minimal time x..
many roads go to Rome ... and now i am happy to write my first QThread
I can only not understand how handle a QThread whit exec inside run().. like a sqlquery
void Gui_Main
::WaitConnectEnd( QString txt
) {
quiwaiter->hide();
quiwaiter->close();
quiwaiter->deleteLater();
show();
Status_MSG(txt);
cannino = 0; /* reset time */
}
void Gui_Main::AIncrement()
{
cannino++; /* each 10 msec... one */
QString st
= tr
("Master Connection on host %1 - check %2").
arg(OneVar
["dbhost1"]).
arg(cannino
);
quiwaiter->Increment();
quiwaiter->SetText( st );
quiwaiter->setFocus ( Qt::MouseFocusReason );
hide();
}
void Gui_Main::WaitConnectEnd( QString txt )
{
quiwaiter->hide();
quiwaiter->close();
quiwaiter->deleteLater();
show();
Status_MSG(txt);
cannino = 0; /* reset time */
}
void Gui_Main::AIncrement()
{
cannino++; /* each 10 msec... one */
QString st = tr("Master Connection on host %1 - check %2").arg(OneVar["dbhost1"]).arg(cannino);
quiwaiter->Increment();
quiwaiter->SetText( st );
quiwaiter->setFocus ( Qt::MouseFocusReason );
hide();
}
To copy to clipboard, switch view to plain text mode
Bookmarks