Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A QML-based web browser?
QtWS25 Last Chance

A QML-based web browser?

Scheduled Pinned Locked Moved General and Desktop
10 Posts 5 Posters 6.7k 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.
  • T Offline
    T Offline
    trusktr
    wrote on 27 Dec 2012, 09:03 last edited by
    #1

    Personally, I think it'd be interesting to see a browser that uses QML/JavaScript instead of HTML/JavaScript. What do you think?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on 27 Dec 2012, 14:14 last edited by
      #2

      There are already a couple of projects already playing around with the idea of porting the QML language to html5/javascript.

      For instance have a look here:
      http://qt-project.org/forums/viewthread/4347

      1 Reply Last reply
      0
      • T Offline
        T Offline
        trusktr
        wrote on 27 Dec 2012, 15:01 last edited by
        #3

        Thanks for the link. That's interesting, but that defeats the purpose of using QML. The purpose of using QML is for hardware accelerated performance. HTML5/JavaScript is slow compared to QML/JavaScript with GPU hardware acceleration. Consider the overhead it would take to first parse QML and convert it into an HTML equivalent using JavaScript, then the overhead of rendering the HTML with software acceleration (hardware acceleration sometimes if you're lucky). That'd be really really slow compared to real QML. QML is a markup language suited for rendering OpenGL hardware-accelerated animations and interfaces; HTML was not designed with hardware acceleration in mind like QML was.

        QML could be a serious contender to HTML! What I'm imagining is a browser that uses the Qt libraries to render QML in the same way that a QML desktop app works, but wrapped inside a browser window. QML is nice for "native" apps because it takes advantage of hardware-accelerated performance at all times. Imagine a browser that looks and feels like Chrome or Firefox, but can retrieve and execute QML with hardware acceleration using the actual Qt libraries (not a parsed HTML/JavaScript version).

        I'm imagining a browser that uses the actual Qt libraries to render QML just like what already happens when you run a hardware-accelerated QML desktop app.

        EDIT: Some browsers support hardware-accelerated animations in HTML using special CSS3 tricks, but trust me, from my short experience with QML and my extensive experience with HTML, I can tell you that QML by far surpasses HTML in the ease at which it lets you make hardware-accelerated interfaces and animations.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jens
          wrote on 27 Dec 2012, 15:49 last edited by
          #4

          Sure, but I would not mind if QML was a web standard. After all there is really no longer a marked for another flash-style browser plugin. Performance is not the only benefit of the language. It is vastly superior to various existing html5 layout techniques for instance, so even without stellar performance I would enjoy doing web design that way.

          That said, perhaps you would be more interested this:
          in http://qt-project.org/wiki/Qt_for_Google_Native_Client

          It will of course only work in Chrome, but it gives you full Qt Quick support in a sandboxed browser environment. The latter being important since executing qml downloaded off the internet would be a major security hazard in a regular application.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            trusktr
            wrote on 27 Dec 2012, 16:27 last edited by
            #5

            True, QML definitely seems vastly superior for layout design and interface animation and interaction than HTML. In that aspect, I could see how a QML to HTML renderer would be nice. The fact that HTML is inferior to QML's layout techniques makes porting QML to HTML a tricky task. But definitely: it would be nice doing web design with QML.

            I would definitely not want another flash-styled browser plugin to embed in HTML pages, but it's interesting to see QML running through Google Native Client.

            In my opinion though, it seems like HTML5 is aiming to be what QML already is: an amazing and high-performing interaction/communication/animation toolset. To see QML implemented in a browser using hardware-acceleration would be amazing. Maybe the Native Client implementation can be a starting point, but I would hate to see QML embedded inside HTML pages. Ideally, I'd like to visit a URL like http://foobar.com/index.qml or http://barfoo.com (where the content's http header returned by the server specifies a QML mime-type, e.g. Content-Type: text/qml; charset=utf-8) and have the browser render the QML inside it's window without any regard to HTML whatsoever; unlike like flash, silverlight, or native client plugins that are embedded inside HTML pages.

            Maybe we do need a QML standard. Or perhaps browsers can adopt the Qt libraries (why re-invent the wheel?). Or maybe the Qt project could release it's own browser capable not just of rendering QML "pages" but also regular HTML5 pages. Or perhaps Qt can release plugins for Chrome, Firefox, and IE that give the browsers the ability to render QML "pages".

            1 Reply Last reply
            0
            • L Offline
              L Offline
              luisvt
              wrote on 13 Jul 2013, 22:11 last edited by
              #6

              [quote author="Jens" date="1356623382"]
              executing qml downloaded off the internet would be a major security hazard in a regular application.[/quote]

              Why is that dangerous??

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JKSH
                Moderators
                wrote on 14 Jul 2013, 04:25 last edited by
                #7

                [quote author="luisvt" date="1373753461"]
                [quote author="Jens" date="1356623382"]
                executing qml downloaded off the internet would be a major security hazard in a regular application.[/quote]

                Why is that dangerous??[/quote]Without "sandboxing":http://en.wikipedia.org/wiki/Sandbox_(computer_security), scripts could access any file or hardware device on your computer. You don't want to let random online scripts access your computer -- they could be used to steal your data, destroy your files, spy on you through your webcam, etc.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  luisvt
                  wrote on 14 Jul 2013, 14:21 last edited by
                  #8

                  How could we implement sandboxing?

                  I know that by default QML cannot access to serial port, file system, and video cameras. To achieve that you need to import special libraries or compile them.

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JKSH
                    Moderators
                    wrote on 15 Jul 2013, 16:06 last edited by
                    #9

                    [quote author="luisvt" date="1373811692"]How could we implement sandboxing?[/quote]That's a big topic (sandboxing is done by web browsers, operating systems, antivirus software, and others). Google it.

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      cybercatalyst
                      wrote on 10 Jul 2015, 11:13 last edited by
                      #10

                      I just went ahead and did it :)
                      https://github.com/cybercatalyst/qmlbrowser

                      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