Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. WebKit using the same principles of a smartphone navigation
Forum Updated to NodeBB v4.3 + New Features

WebKit using the same principles of a smartphone navigation

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 610 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fxmontigny
    wrote on last edited by
    #1

    Hi,

    I would like to create a WebKit using the same principles of a smartphone navigation.

    I found this page http://qt-project.org/doc/qt-5/qtwebkit-goes-mobile.html.

    But when I use the cursor like a finger it doesn't work (the cursor selects the text and does not move my page).

    Could you help me with my code please?

    @#include <QApplication>
    #include <QtWidgets>
    #include <QtWebKitWidgets/QGraphicsWebView>

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    const int width = 640;
    const int height = 480;

    QGraphicsScene scene;
    
    QGraphicsView view(&scene);
    view.setFrameShape(QFrame::NoFrame);
    view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    
    QGraphicsWebView webview;
    webview.resize(width, height);
    webview.setResizesToContents(true);
    webview.settings()->setAttribute(QWebSettings::FrameFlatteningEnabled, true);
    webview.load(QUrl("http://doc.qt.nokia.com/"));
    
    
    scene.addItem(&webview);
    
    view.resize(width, height);
    view.show();
    
    return app.exec();
    

    }
    @

    Thanks,
    Fx

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved