Qevent bool isAccepted () const / <QWhatsThisClickedEve
Verfasst: 15. April 2006 16:53
Wie kann ich auf die event vom button isAccepted zugreifen?
den offene QDialog steuere ich aus dem QMainWindow
es funktioniert prima ... aber wie bekomme ich eine bool von accept/reject ohne noch mehr slots zu schreiben?
im dialog sende ich ein qpointer an qmainwindow so habe ich voll zugriff auf jedes element
den offene QDialog steuere ich aus dem QMainWindow
es funktioniert prima ... aber wie bekomme ich eine bool von accept/reject ohne noch mehr slots zu schreiben?
Code: Alles auswählen
void Gui_Front::OpenRemotehttpDialog()
{
/* Here is QMainWindow */
/* grap vars from theurltoopen text field */
Gui_Open_Remote_Dialog::self( this )->exec();
if (Gui_Open_Remote_Dialog::_self ) {
QString Parent_Text_Url = Gui_Open_Remote_Dialog::_self->theurltoopen->text();
if (!IsNetFile( Parent_Text_Url )) { /* and bool button is accept/reject */
if (Parent_Text_Url.size() > 0) {
/* message box */
msgb->information( this , "Ther Url......... ", "Sorry: Url is not valid! "+ Parent_Text_Url );
Gui_Open_Remote_Dialog::self( this )->exec();
}
} else {
if (Parent_Text_Url.size() > 2) {
xml_edit_line->setText ( Parent_Text_Url );
UpdateArea();
/* UpdateArea(); */
}
}
}
}
im dialog sende ich ein qpointer an qmainwindow so habe ich voll zugriff auf jedes element
Code: Alles auswählen
QPointer<Gui_Open_Remote_Dialog> Gui_Open_Remote_Dialog::_self = 0L;
//
Gui_Open_Remote_Dialog* Gui_Open_Remote_Dialog::self( QWidget* parent )
{
if ( !_self )
_self = new Gui_Open_Remote_Dialog( parent );
return _self;
}