PDA

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



rsilva
11th May 2011, 03:38
I'm trying to copy some simple text from a QWebView.
I've tried to use this code but doesn't working too:



QAction *act = this->pageAction(QWebPage::Copy);
act->setShortcut(QKeySequence::Copy);


How I can enable the Ctrl+C command ?

wysota
17th May 2011, 02:28
Ctrl+C should be working just fine.

rsilva
17th May 2011, 05:05
Not here, tried so many times pressing Ctrl+C and nothing was copied.
Created another project and tried and not working.

ShapeShiftme
27th May 2011, 18:24
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..

mentalmushroom
13th September 2011, 14:42
have the same problem (qt 4.7.2 win7 x64)

Added after 4 minutes:

Try the following workaround. It worked for me.

QAction *copyAction = webView->pageAction(QWebPage::Copy);
copyAction->setShortcut(QKeySequence::Copy);
webView->addAction(copyAction);