PDA

View Full Version : a simple application



aegis
12th March 2007, 14:09
hi, i am trying to make a simple application with 2 QLineEdits.... where i type text in one, and automatically in the other it appears Capitalized....




connect(lineEditOriginalText, SIGNAL(textChanged(QString&)), this, SLOT(functionCaseChange(QString&)));
connect(lineEditOriginalText, SIGNAL(textEdited(QString&)), this, SLOT(functionCaseChange(QString&)));



why both of these connects don't work....???

thanks in advance for your help...

Kumosan
12th March 2007, 14:12
Not enough info.

wysota
12th March 2007, 14:25
Hmm... I think it should be "const QString&". And make sure "functionCaseChange" is declared as a slot.

aegis
12th March 2007, 14:41
Hmm... I think it should be "const QString&". And make sure "functionCaseChange" is declared as a slot.
yes, you were right....it was "const QString&"

thank you all for your answers...

aegis
12th March 2007, 14:49
two other questions for the same application.....

i want to copy the contents of a QLineEdit to clipboard...
so i 've made a function that does:::


lineEditEditedText->selectAll();
lineEditEditedText->copy();


the problem is that i don't the text to appear selected after this function...is there anyway to copy the contents of QLineEdit without using the select all.....

my second question is that i want to have an option to this dialog:::"Always on top" so that it stays always on top of other applications, how can i do this...??

Lykurg
12th March 2007, 15:02
is there anyway to copy the contents of QLineEdit without using the select all.....

Have a look at QLineEdit::text() and QClipboard::setText()



my second question is that i want to have an option to this dialog:::"Always on top" so that it stays always on top of other applications, how can i do this...??

See Qt::WindowFlags


Lykurg

Kumosan
12th March 2007, 15:04
two other questions for the same application.....

i want to copy the contents of a QLineEdit to clipboard...
so i 've made a function that does:::


lineEditEditedText->selectAll();
lineEditEditedText->copy();


the problem is that i don't the text to appear selected after this function...is there anyway to copy the contents of QLineEdit without using the select all.....

No idea here. Looks ok for me.



my second question is that i want to have an option to this dialog:::"Always on top" so that it stays always on top of other applications, how can i do this...??

No sure if this is possible at all. You might be able to tell its parent application that you always want to have this dialog on top. But for all applications? Things like that are very dependent on what window manager you use. I have often seen that KDE is ignoring window flags. And if you think about it, it is only logical. KDE is an integrated desktop manager, it allows a very fine grained configuration how it handles single programs. Would be quite a mess, if every program could ignore global settings and do what it wants.