Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
p, li { white-space: pre-wrap; }

#include <QtGui>

#include "gotocelldialog.h"



GoToCellDialog::GoToCellDialog(QWidget *parent)

    : QDialog(parent)

{

    setupUi(this);

    QRegExp regExp("[A-Za-z][1-9][0-9]{0,2}");//rajoitetaan sallittuja kirjaimia ja numeroita

    lineEdit->setValidator(new QRegExpValidator(regExp, this));

    connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));

    connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));

}



void GoToCellDialog::on_lineEdit_textChanged()

{

    okButton->setEnabled(lineEdit->hasAcceptableInput());

}

ad

Code Block

a

p, li { white-space: pre-wrap; }

#include <QApplication>



#include "gotocelldialog.h"



int main(int argc, char *argv[])

{

    QApplication app(argc, argv);

    GoToCellDialog *dialog = new GoToCellDialog;

    dialog->show();

    return app.exec();

}

a

Code Block

a

Labels