@RHBaum
Stimmt schon mit der Designschwäche, ich hatte auch in die falsche Richtung gedacht, ich wollte bei mehrere LineEdits die Eingabe Parsen aber dazu bietet - wie ich jetzt festgestellt habe - Qt ja schon die QRegExpValidator an.
Jedoch habe ich jetzt ein weiteres Problem:
Seltsamerweise nimmt er meinen Regexp beim email (LineEdit) nicht an.
Bei den ersten drei LineEdit's stimmt es, habe ich hier ein Speicherproblem?
PHP-Code:
qotrdecoder::qotrdecoder()
{
ui.setupUi(this);
QRegExp ireg( "[\\w\\d\\/\\.-]+", Qt::CaseInsensitive );
QRegExpValidator VPath( ireg, this );
ui.inp_bin->setValidator( &VPath );
ui.inp_key_file->setValidator( &VPath );
ui.inp_output->setValidator( &VPath );
QRegExp mreg( "([\\w\\d\\/\\.-]+)@([\\w\\d\\/\\.-]+)\\.([a-z]{2,})", Qt::CaseSensitive, QRegExp::FixedString );
QRegExpValidator VMail( mreg, this );
ui.inp_email->setValidator( &VMail );
// Signals
connect( ui.btn_cancel, SIGNAL( clicked() ), this, SLOT( SlotTester() ) );
connect( ui.btn_decode, SIGNAL( clicked() ), this, SLOT( SlotTester() ) );
connect( ui.btn_open_bin, SIGNAL( clicked() ), this, SLOT( SlotTester() ) );
connect( ui.btn_open_key, SIGNAL( clicked() ), this, SLOT( SlotTester() ) );
connect( ui.btn_open_dir, SIGNAL( clicked() ), this, SLOT( SlotTester() ) );
connect( ui.inp_bin, SIGNAL( textEdited( const QString & ) ),
this, SLOT( SlotStringTester( const QString & ) ) );
connect( ui.inp_key_file, SIGNAL( textEdited( const QString & ) ),
this, SLOT( SlotStringTester( const QString & ) ) );
connect( ui.inp_output, SIGNAL( textEdited( const QString & ) ),
this, SLOT( SlotStringTester( const QString & ) ) );
// connect( ui.inp_pass, SIGNAL(), this, SLOT() );
// connect( ui.inp_email, SIGNAL(), this, SLOT() );
}
Lesezeichen