PDA

View Full Version : Login Form in QT



panyang
21st January 2011, 06:22
hi..im new here..can anyone help with my first Qt apps. im making on a qt project..i want to have it a log-in form that will have a user and its password..i dont know how to make the password asterisk and i dont know how to link the user and password and enter my main form..someone help me please..thanks..

tbscope
21st January 2011, 07:38
If you don't have any experience with C++, I suggest you start there.

For learning Qt:
http://qt.nokia.com/services-partners/qt-in-education/qt-in-education-course-material
http://doc.qt.nokia.com/4.7/index.html

As for the password asterisk:
http://doc.qt.nokia.com/4.7/qlineedit.html#EchoMode-enum

panyang
27th January 2011, 03:10
thanks for the reply..by the way, where should i declare the enum?

tbscope
27th January 2011, 04:33
I suppose you want an enum to store the username and password?
It depends on the logic of your program I guess. Most likely you have a general manager class (for most people this is the main window, or a download manager, ...)
You can define the enum in that class because it is the most likely place where communication connections are made.

ChrisW67
27th January 2011, 05:07
thanks for the reply..by the way, where should i declare the enum?

I assume you mean the QLineEdit::EchoMode that tbscope linked to. You don't need to declare it, just include the Qt headers.

You use these values with the QLineEdit::setEchoMode() method in your own code. If you are using Qt Creator or Designer then there is a drop-down property, oddly enough called echoMode, you can set on the line edit in the form design.

panyang
27th January 2011, 06:18
it works!!thanks guys..i have another question,.here's the situation

after i login i want to open a new window..how can i activate it?

ChrisW67
27th January 2011, 22:01
What have you tried?

panyang
28th January 2011, 08:18
mm, im still in the process of figuring out what should i do with that..hehe..

nish
28th January 2011, 11:57
you will do it fast and learn more if you go through the examples provided in Qt and documentation instead of asking question here

panyang
29th January 2011, 05:41
yeah..im doing that this week and im working on their addressbook example..;)