I found that codes
pqUpcaseValidator
::pqUpcaseValidator( QWidget* Parent,
const char* Name
){}
QValidator::State pqUpcaseValidator
::validate( QString
& Text , int
& Pos
) const {
Text = Text.upper();
return Acceptable;
}
pqUpcaseValidator::pqUpcaseValidator( QWidget* Parent, const char* Name )
: QValidator( Parent, Name )
{}
QValidator::State pqUpcaseValidator::validate( QString& Text , int& Pos ) const
{
Text = Text.upper();
return Acceptable;
}
To copy to clipboard, switch view to plain text mode
What kind of document I should write?
is that currect?
#ifndef MYUPPERLINE_H
#define MYUPPERLINE_H
#include <QtGui>
{
public:
pqUpcaseValidator
::pqUpcaseValidator( QWidget* Parent,
const char* Name
) {}
QValidator::State pqUpcaseValidator
::validate( QString
& Text , int
& Pos
) const {
Text = Text.upper();
return Acceptable;
}
};
#ifndef MYUPPERLINE_H
#define MYUPPERLINE_H
#include <QtGui>
class MyUpperLine2 : public QLineEdit
{
public:
MyUpperLine2(QWidget* parent = 0):QLineEdit(parent) { }
pqUpcaseValidator::pqUpcaseValidator( QWidget* Parent, const char* Name )
: QValidator( Parent, Name )
{}
QValidator::State pqUpcaseValidator::validate( QString& Text , int& Pos ) const
{
Text = Text.upper();
return Acceptable;
}
};
To copy to clipboard, switch view to plain text mode
and is it enough to promote it by designer?
Bookmarks