<BODY style=\"-moz-user-select: none; -khtml-user-select: none; user-select: none;\">
C++ (Qt)class MainWindow : public QMainWindow{....private: bool sb_flag;....} MainWindow::MainWindow(){ centralWidget = new Previewer(this); setCentralWidget(centralWidget); ... centralWidget->webView->installEventFilter(this); sb_flag = false; .... } bool MainWindow::eventFilter ( QObject * watched, QEvent * e){ if (watched == centralWidget->webView) { if (e->type() == QEvent::MouseMove) { QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(e); if ( mouseEvent->buttons() & Qt::LeftButton & sb_flag) { return true; } sb_flag = false; } else if ( e->type() == QEvent::MouseButtonPress) { sb_flag = false; QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(e); if ( mouseEvent->modifiers() & Qt::ShiftModifier) { return true; } } else if ( e->type() == 724) // не спрашивайте меня что это за код события, я не знаю ) он прилетает когда водишь мышкой с нажатой левой кнопкой и мышка находится не на скролбаре { sb_flag = true; } else if ( e->type() == QEvent::MouseButtonDblClick) { return true; } else if ( e->type() == QEvent::ContextMenu ) { return true; } } return QMainWindow::eventFilter(watched, e);}
void QWebSettings::setUserStyleSheetUrl ( const QUrl & location )Specifies the location of a user stylesheet to load with every web page.The location must be either a path on the local filesystem, or a data URL with UTF-8 and Base64 encoded data, such as:"data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow=="Note: If the base64 data is not valid, the style will not be applied.
* {-moz-user-select: none; -khtml-user-select: none; user-select: none;}
body {cursor: default;}a {cursor: pointer;}