Results 1 to 9 of 9

Thread: how TextEdit::cut(),copy(), paste() come to use

  1. #1
    Join Date
    Nov 2006
    Location
    gurgaon
    Posts
    49
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: what will be the coding for Menu->File->open

    {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
    Last edited by jacek; 10th November 2006 at 12:12.
    thanks & regards
    --------------------
    jyoti

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what will be the coding for Menu->File->open

    QTextEdit already has capabilities of cut,copy, paste, undo, redo.

    This might help

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what will be the coding for Menu->File->open

    Check QTextEdit's copy,paste,,,, slots...

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

  4. #4
    Join Date
    Nov 2006
    Location
    gurgaon
    Posts
    49
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: what will be the coding for Menu->File->open

    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
    thanks & regards
    --------------------
    jyoti

  5. #5
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what will be the coding for Menu->File->open

    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.

  6. #6
    Join Date
    Nov 2006
    Location
    gurgaon
    Posts
    49
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: what will be the coding for Menu->File->open

    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
    thanks & regards
    --------------------
    jyoti

  7. #7
    Join Date
    Nov 2006
    Location
    gurgaon
    Posts
    49
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X

    Default how TextEdit::cut(),copy(), paste() come to use

    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
    thanks & regards
    --------------------
    jyoti

  8. #8
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how TextEdit::cut(),copy(), paste() come to use

    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

  9. #9
    Join Date
    Nov 2006
    Location
    gurgaon
    Posts
    49
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: how TextEdit::cut(),copy(), paste() come to use

    thank u ....
    thanks & regards
    --------------------
    jyoti

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.