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. How can I use QWebEngineView ?

How can I use QWebEngineView ?

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 2 Posters 3.6k 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.
  • S Offline
    S Offline
    SamurayH
    wrote on 6 Jul 2018, 17:56 last edited by SamurayH 7 Jun 2018, 17:56
    #1

    Hey everyone,
    I need to show in my project a complex HTML file that uses CSS and JS. When I searched for a web viewer I found QWebEngineView widget, which looks very use full. Unfortunately, I wasn't able to use it while I'm compiling with MinGW, knowing that QWebEngine will only work when using MSVC compiler.
    The problem is that I'm newer to those compilers problems, and I don't know how I can switch to MSVC, and be able to use QWebEngineView.
    I don't want to use QDesktopService:: OpenUrl, because I need to control the opened file.
    I would appreciate your help.


    Environment : win7 , 32 bits. Qt 5.10.

    "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 6 Jul 2018, 18:10 last edited by mrjj 7 Jun 2018, 18:29
      #2

      Hi
      You can just load it from microsoft
      https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio
      Make sure to select only the c++ workload if you want to use Qt Creator
      and the compiler. Then you dont need the IDE also.
      Also make sure not to check all things as its then like 30 GB install.
      You just need SDK and c++ compiler.
      Do you normally use the debugger ? if yes, then you also need to install the Debugging tools
      go get a standalone that Creator can use.
      http://doc.qt.io/qtcreator/creator-debugger-engines.html

      Creator should pick up the new compiler.
      In your project folder. delete the xx.user file
      and reopen project. it will then ask which compiler to use and you select the VS one.

      You might also need
      https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
      but wait to see if it gives any errors.

      And also download a vs 2017 Qt version (32/64 bit) or both,
      alt text

      Note if you want 32bit, its ok to use vs2015 Qt with vs 2017.
      Normally it must match 100% but 2015 & 2017 are for first time
      compatible.

      If you have no need for 64 bit. just install 32 bit only.
      ( this is for compiling 32/64 bit apps) not related if you windows is 32 or 64 bit itself.

      S 1 Reply Last reply 6 Jul 2018, 18:30
      3
      • M mrjj
        6 Jul 2018, 18:10

        Hi
        You can just load it from microsoft
        https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio
        Make sure to select only the c++ workload if you want to use Qt Creator
        and the compiler. Then you dont need the IDE also.
        Also make sure not to check all things as its then like 30 GB install.
        You just need SDK and c++ compiler.
        Do you normally use the debugger ? if yes, then you also need to install the Debugging tools
        go get a standalone that Creator can use.
        http://doc.qt.io/qtcreator/creator-debugger-engines.html

        Creator should pick up the new compiler.
        In your project folder. delete the xx.user file
        and reopen project. it will then ask which compiler to use and you select the VS one.

        You might also need
        https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
        but wait to see if it gives any errors.

        And also download a vs 2017 Qt version (32/64 bit) or both,
        alt text

        Note if you want 32bit, its ok to use vs2015 Qt with vs 2017.
        Normally it must match 100% but 2015 & 2017 are for first time
        compatible.

        If you have no need for 64 bit. just install 32 bit only.
        ( this is for compiling 32/64 bit apps) not related if you windows is 32 or 64 bit itself.

        S Offline
        S Offline
        SamurayH
        wrote on 6 Jul 2018, 18:30 last edited by
        #3

        @mrjj you answers all my questions for now. I'm working on it.
        I just have to say thank you so much for you and for this amazing and active Forum.

        "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

        M 1 Reply Last reply 6 Jul 2018, 18:35
        2
        • S SamurayH
          6 Jul 2018, 18:30

          @mrjj you answers all my questions for now. I'm working on it.
          I just have to say thank you so much for you and for this amazing and active Forum.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 6 Jul 2018, 18:35 last edited by
          #4

          @SamurayH
          I cross fingers it just works.
          Sometimes on has to go and select the stuff in kits but lets hope it picks up automatically.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SamurayH
            wrote on 6 Jul 2018, 18:44 last edited by
            #5

            I'm confused, too much components.
            0_1530902596724_blabla.PNG
            What do I have to uncheck, if I don't want VS IDE ? Qt Creator is just perfect for me.

            "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

            M 1 Reply Last reply 6 Jul 2018, 18:46
            0
            • S SamurayH
              6 Jul 2018, 18:44

              I'm confused, too much components.
              0_1530902596724_blabla.PNG
              What do I have to uncheck, if I don't want VS IDE ? Qt Creator is just perfect for me.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 6 Jul 2018, 18:46 last edited by
              #6

              @SamurayH
              Hmm, cant read it but guessing would be
              alt text

              1 Reply Last reply
              1
              • S Offline
                S Offline
                SamurayH
                wrote on 6 Jul 2018, 19:07 last edited by
                #7

                Oh yes excuse me it's french, so now I selected :

                • VC++ 2017 toolset

                • Windows 10 SDK

                That's all I need ?

                "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

                M 1 Reply Last reply 6 Jul 2018, 19:16
                0
                • S SamurayH
                  6 Jul 2018, 19:07

                  Oh yes excuse me it's french, so now I selected :

                  • VC++ 2017 toolset

                  • Windows 10 SDK

                  That's all I need ?

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 6 Jul 2018, 19:16 last edited by
                  #8

                  @SamurayH
                  Yes i think so. Seems ok.
                  (its excluding debugger as we talked about)

                  1 Reply Last reply
                  2
                  • S Offline
                    S Offline
                    SamurayH
                    wrote on 7 Jul 2018, 18:56 last edited by
                    #9

                    Hi,
                    Finally I'm able to use QWebEngineView. Thanks again. However I can't compile my program for the moment, the msvc compiler detects tons of problems (in Qt sources and mine), knowing that when I was compiling with MinGW, they were no problems. Here's a screenshot of a list that I could capture, and the compilation log :
                    1_1530989684622_ededs.PNG 0_1530989684601_cx.PNG

                    Thanks.

                    "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 7 Jul 2018, 19:44 last edited by
                      #10

                      Hi
                      Did you apply all updates for vs2015 ?
                      seems it dont like QtConcurrent so i wondering if its c+11 is not
                      updated.

                      1 Reply Last reply
                      2
                      • S Offline
                        S Offline
                        SamurayH
                        wrote on 8 Jul 2018, 09:34 last edited by SamurayH 7 Aug 2018, 09:35
                        #11

                        This is what happened, in collaboration with @mrjj : @Qt-Champions-2017

                        • After downloading msvc2017 (last version), with Qt 5.11, things got complicated check this thread for more.
                        • So I downgraded from msvc2017 to 2015, and from Qt 5.11 to Qt 5.10
                          compiling...
                        • NO! the msvc is complaining about tons of Qt files....
                          so what?
                        • The version of msvc2015 that I downloaded don't like some syntaxe in c++11...
                        • Updating msvc2015 to the last update
                          compiling...
                        • NO! stop, you just have to update to Qt 5.10.1, idiot!

                        I recapitulate : msvc2015(with last update) + Qt 5.10.1 will work just fiiiine.
                        Thanks to @mrjj, and to you all, this topic has now the honor to be marked as SOLVED.

                        "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

                        1 Reply Last reply
                        1
                        • M Offline
                          M Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on 8 Jul 2018, 09:38 last edited by
                          #12

                          hi
                          i learned something valuable that QtConcurrent and friends needs 5.10.1 as not to give errors
                          even if compiler is correctly installed and updated.
                          It might be mentioned in the docs but i didnt see it.

                          1 Reply Last reply
                          1

                          10/12

                          7 Jul 2018, 19:44

                          • Login

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