#include <QApplication>
#include <QWidget>
#include <QLineEdit>
{
Q_OBJECT
private slots:
void open()
{
/* code to write to a file */
// i know this part.
}
};
int main(int argc, char* argv[])
{
password.move(480,750);
password.resize(370,30);
window.setWindowState(Qt::WindowFullScreen);
QObject::connect(&password,
SIGNAL(returnPressed
()),
&password,
SLOT(write_to_file
()));
window.show();
return app.exec();
}
#include <QApplication>
#include <QWidget>
#include <QLineEdit>
class NewSlot : public QWidget
{
Q_OBJECT
private slots:
void open()
{
/* code to write to a file */
// i know this part.
}
};
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QWidget window;
QLineEdit password("",&window);
password.move(480,750);
password.resize(370,30);
password.setEchoMode(QLineEdit::Password);
window.setWindowState(Qt::WindowFullScreen);
QObject::connect(&password,SIGNAL(returnPressed()),&password,SLOT(write_to_file()));
window.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
ok can i normally create a object of the class NewSlot and call in connect() and by the way how do i get the data of the password(QLineedit) field
Thank you very much for helping me!
Bookmarks