PDA

View Full Version : how TextEdit::cut(),copy(), paste() come to use



jyoti
10th November 2006, 05:30
{Two threads merged.}

thanks alot...i ws useful
can u plz tell for undo,cut, copy, paste
plz tell in coding part
as i m using textedit on menu window

void form1::mycut()
{
textEdit->
}
void form1::mycopy()
{

}
void form1::mypaste()
{

}

plz send reply as soon as possible

munna
10th November 2006, 05:48
QTextEdit already has capabilities of cut,copy, paste, undo, redo.

This (http://doc.trolltech.com/4.1/qtextedit.html#using-qtextedit-as-an-editor) might help

aamer4yu
10th November 2006, 05:49
Check QTextEdit's copy,paste,,,, slots...

and check the text edit example in demos... u will get what u want..

jyoti
10th November 2006, 06:19
see i m a beginner n i ve no guidance....
so i m learning how to impliment all signal slots properties n all
so plz do edit in my coding as i had send to all of u....
let me explain to u...
i ve a main window n i m learning to create menu i had made open ,save ,new, exit in File
and in edit i had made cut copy paste undo
n i ve one textedit on same window where i will write something then try to cut,copy or paste the written text to same textedit/different textedit....

so plz send its coding in my coding

thanks in advance

aamer4yu
10th November 2006, 06:27
sorry to say, but i think you are asking for spoon feeding.

I am a beginner too, and if we beginers ask for the code directly, our queries mihgt not be taken seriously in future.
You can copy the code from examples and try modifying that code to learn. I dont think its good to ask others to do it for you.

As I am a beginer too, I would suggest to read the documents, see demos, and play around with the code in examples.

jyoti
10th November 2006, 06:50
u may ve the the guidance...bt i dont ve....i m learning it online...only....
so if i had asked i dot think so...its a big deal everyone ask from forum...and this is the right to ask....but sorry to say if u ve problem then u dont suggest nything simple...
forums r being created to ask queries...either he/she is beginner or expert

so plz anyone help me...out to solve my problem

jyoti
10th November 2006, 08:02
hi all

plz tell me wht smthing should be contained in mycut.......mypaste()

void form1::mycut()
{
//wht smthing??
}
void form1::mycopy()
{
//wht smthing??
}
void form1::mypaste()
{
//wht smthing??
}


TIA

munna
10th November 2006, 08:11
Once you have QTextEdit in your menu, try selecting some text and press Ctrl+X.

It should cut the text.

Now change the cursor position and press Ctrl+V.

Therefore, you really do not have to do anything for implementing cut,copy and paste.

Alternatively, if you want to add cut, copy paste in your menu and make it work, then you can call the following slots directly.

void cut();
void copy();
void paste();

Hope this helps

jyoti
10th November 2006, 09:39
thank u ....:)