Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qtwebkit 5.212 setuserstylesheet() is taking 7seconds to apply stylesheet first time.
Qt 6.11 is out! See what's new in the release blog

Qtwebkit 5.212 setuserstylesheet() is taking 7seconds to apply stylesheet first time.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 168 Views
  • 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.
  • R Offline
    R Offline
    Ramakanth
    wrote on last edited by Ramakanth
    #1

    Am using Qt WebKit 5.212 Alpha4 release through yocto build on top of Qt 5.6.3 binaries and found good with respect to security bugs and fixes as recommended and QtTestBrowser works fine on target.

    Below are the cmake qtwebkit bb options:

    "
    -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=arm
    -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
    -DENABLE_WEBKIT2=OFF -DENABLE_OPENGL=OFF
    -DENABLE_GEOLOCATION=OFF -DENABLE_DEVICE_ORIENTATION=OFF -DENABLE_VIDEO=OFF -DENABLE_WEB_AUDIO=OFF -DUSE_LIBHYPHEN=OFF
    -DPORT=Qt
    -DCROSS_COMPILE=ON
    "

    Below are the sample codes in our UiApp:
    webView = new QWebView();
    webView->setContextMenuPolicy( Qt::NoContextMenu );
    webView->settings()->setUserStyleSheetUrl( QUrl::fromLocalFile(<stylesheetpath.css> ) );//This API Takes 7 secs to apply stylesheet
    webView->settings()->setDefaultTextEncoding( "utf-8");

    Not sure why setUserStyleSheetUrl() takes more loading time of 7 secs when it is set through button click for the first time. However, subsequent stylesheet operations are fast in the order of ms.

    Am unable to reproduce the same in sample app where it takes only 300-400ms for the same api setUserStyleSheetUrl first time on target.

    Appreciate your suggestions in this regard incase there are any missing QWebSettings to be set which causes synchronous loading of css stylesheet instead of asynchronous loading.

    Found that QWebPage creation takes 7secs time on profiling. Any suggestions are welcome.

    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