
Originally Posted by
wenn32
now i really need help please!
it's easier than you imagine:
{
Q_OBJECT
private:
private slots:
void write_to_file()
{
// write it to your file
}
public:
MyScreen()
{
password->move(480,750);
password->resize(370,30);
setWindowState(Qt::WindowFullScreen);
connect( password,SIGNAL(returnPressed()), this ,SLOT(write_to_file())
}
};
int main(int argc, char* argv[])
{
NewSlot window;
window.show();
return app.exec();
}
class MyScreen: public QWidget
{
Q_OBJECT
private:
QLineEdit* password;
private slots:
void write_to_file()
{
QString text = password->text();
// write it to your file
}
public:
MyScreen()
{
password = new QLineEdit("" , this);
password->move(480,750);
password->resize(370,30);
password->setEchoMode(QLineEdit::Password);
setWindowState(Qt::WindowFullScreen);
connect( password,SIGNAL(returnPressed()), this ,SLOT(write_to_file())
}
};
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
NewSlot window;
window.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks