Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML - extending an existing item
Forum Updated to NodeBB v4.3 + New Features

QML - extending an existing item

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 5 Posters 2.7k 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.
  • P Offline
    P Offline
    Peppy
    wrote on last edited by
    #1

    How to extend an existing WebView in QML (I mean adding background in C++) and still be able to use that in QML ?
    Multiinheritance of QWebView and DeclarativeItem ?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      task_struct
      wrote on last edited by
      #2

      Hello,

      I think it is posible by using Qt private headers.

      "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

      • Linu...
      1 Reply Last reply
      0
      • P Offline
        P Offline
        Peppy
        wrote on last edited by
        #3

        But that means rewrite the whole public header...

        1 Reply Last reply
        0
        • R Offline
          R Offline
          remy_david
          wrote on last edited by
          #4

          I tried this approach but gave up after a day. This is tricky because private Qt headers are very hard to understand without Qt background knowledge.

          Instead I use a QGraphicsProxyWidget with qmlRegisterType to extend and expose existing QWidget to QML.
          In your case you could use QGraphicsWebView.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aabc
            wrote on last edited by
            #5

            You can extend them on QML

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Peppy
              wrote on last edited by
              #6

              I am not interested in extending via QML. I have to create new item via C++ and add it (register and use) in QML/C++.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sfiet_Konstantin
                wrote on last edited by
                #7

                It all depends on what you want to do with this webview. And I think using a QGraphicsWebView that is registered as a QDeclarativeItem may be a good idea.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Peppy
                  wrote on last edited by
                  #8

                  Well, does anybody have a working files, that really works, could anybody leave working example here? ... documentation is quite mean on that...

                  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