Qevent bool isAccepted () const / <QWhatsThisClickedEve

Alles rund um die Programmierung mit Qt
Antworten
patrik08
Beiträge: 746
Registriert: 27. Februar 2006 10:48
Wohnort: DE Freiburg

Qevent bool isAccepted () const / <QWhatsThisClickedEve

Beitrag von patrik08 »

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?

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;
}

Antworten