Results 1 to 5 of 5

Thread: QWebView Ctrl+C for copy isn't working, how to fix ?

  1. #1
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QWebView Ctrl+C for copy isn't working, how to fix ?

    I'm trying to copy some simple text from a QWebView.
    I've tried to use this code but doesn't working too:

    Qt Code:
    1. QAction *act = this->pageAction(QWebPage::Copy);
    2. act->setShortcut(QKeySequence::Copy);
    To copy to clipboard, switch view to plain text mode 

    How I can enable the Ctrl+C command ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QWebView Ctrl+C for copy isn't working, how to fix ?

    Ctrl+C should be working just fine.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWebView Ctrl+C for copy isn't working, how to fix ?

    Not here, tried so many times pressing Ctrl+C and nothing was copied.
    Created another project and tried and not working.

  4. #4
    Join Date
    Dec 2010
    Location
    South Africa
    Posts
    56
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: QWebView Ctrl+C for copy isn't working, how to fix ?

    Quote Originally Posted by rsilva View Post
    Not here, tried so many times pressing Ctrl+C and nothing was copied.
    Created another project and tried and not working.
    Did you fiqure this out im having the same problem..

  5. #5
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: QWebView Ctrl+C for copy isn't working, how to fix ?

    have the same problem (qt 4.7.2 win7 x64)


    Added after 4 minutes:


    Try the following workaround. It worked for me.
    Qt Code:
    1. QAction *copyAction = webView->pageAction(QWebPage::Copy);
    2. copyAction->setShortcut(QKeySequence::Copy);
    3. webView->addAction(copyAction);
    To copy to clipboard, switch view to plain text mode 
    Last edited by mentalmushroom; 13th September 2011 at 13:41.

Similar Threads

  1. Replies: 8
    Last Post: 3rd September 2013, 09:51
  2. QWebView Images with UNC path not working
    By michael. in forum Qt Programming
    Replies: 1
    Last Post: 2nd March 2012, 08:46
  3. How to send a "Ctrl+V" event to a QWebView
    By daudiam in forum Qt Programming
    Replies: 2
    Last Post: 1st December 2010, 09:51
  4. Why Ctrl+A not working in QListWidget?
    By rajesh in forum Qt Programming
    Replies: 6
    Last Post: 10th December 2009, 14:40
  5. CTrl + A
    By navi1084 in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2008, 09:19

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.