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. Write simple web client for website
Forum Updated to NodeBB v4.3 + New Features

Write simple web client for website

Scheduled Pinned Locked Moved Solved General and Desktop
web client
10 Posts 5 Posters 2.2k 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.
  • N Offline
    N Offline
    nikich340
    wrote on 24 Dec 2018, 02:29 last edited by
    #1

    I want to try to write simple web client for one website. My client should be able to pass authorization (send data for two text fields), push simple buttons and click checkboxes on current page. I need not view page, go back/next or download something (so I do not want to create browser, only simple client, where I can hardcode urls). To be more common, I must understand how to parse page elements and create requents with actions I described above (also, if it requires authorization, should it somehow save session?).

    I just started learn network modules in Qt, so I am quite confused with QWebEngine, QWebKit, QNetwork modules - what of them is most suitable for me? Any literature and examples are welcome. Thanks in advance.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 24 Dec 2018, 04:45 last edited by
      #2

      Since you are starting to learn, your idea is to check how web requests work in Qt, just start using the QNetworkAccessManager. Look at the some examples in Qt installation example directory or google. It will give you idea about you can start accessing the web server.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 24 Dec 2018, 14:45 last edited by
        #3

        Hi and welcome to devnet,

        What is exactly the goal of your application ? Provide a webpage to discuss with the backend ? Do a full custom GUI ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        F N 2 Replies Last reply 24 Dec 2018, 19:37
        0
        • S SGaist
          24 Dec 2018, 14:45

          Hi and welcome to devnet,

          What is exactly the goal of your application ? Provide a webpage to discuss with the backend ? Do a full custom GUI ?

          F Offline
          F Offline
          fouad2130
          Banned
          wrote on 24 Dec 2018, 19:37 last edited by fouad2130
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • S SGaist
            24 Dec 2018, 14:45

            Hi and welcome to devnet,

            What is exactly the goal of your application ? Provide a webpage to discuss with the backend ? Do a full custom GUI ?

            N Offline
            N Offline
            nikich340
            wrote on 27 Dec 2018, 12:38 last edited by
            #5

            @SGaist
            TO make something like GUI wrapper for website. It is very inconvenient from usual browser. Also I want to learn a bit net programming in Qt.

            1 Reply Last reply
            0
            • V Offline
              V Offline
              VRonin
              wrote on 27 Dec 2018, 12:50 last edited by
              #6

              Something like https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-simplebrowser-example.html ?

              so I am quite confused with QWebEngine, QWebKit, QNetwork modules - what of them is most suitable for me?

              QtWebKit uses the same engine as apple's safari browser. the module has been discontinued since Qt 5.6
              QtWebEngine uses the same engine as google chrome and is used to interact with webpages html and the likes.
              QtNetwork is much more low level and is used to manage network communication. You can use QNetworkAccessManager to interact with http but if you need to run html/css/javascript on webpages, you are in the wrong place

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              N 2 Replies Last reply 27 Dec 2018, 13:33
              2
              • V VRonin
                27 Dec 2018, 12:50

                Something like https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-simplebrowser-example.html ?

                so I am quite confused with QWebEngine, QWebKit, QNetwork modules - what of them is most suitable for me?

                QtWebKit uses the same engine as apple's safari browser. the module has been discontinued since Qt 5.6
                QtWebEngine uses the same engine as google chrome and is used to interact with webpages html and the likes.
                QtNetwork is much more low level and is used to manage network communication. You can use QNetworkAccessManager to interact with http but if you need to run html/css/javascript on webpages, you are in the wrong place

                N Offline
                N Offline
                nikich340
                wrote on 27 Dec 2018, 13:33 last edited by
                #7

                @VRonin
                I see. Thank you, I found some examples, hope I will success one day.
                If I am not mistaken, I should use QHttpPart structure to set up sent data and send it.

                1 Reply Last reply
                0
                • V VRonin
                  27 Dec 2018, 12:50

                  Something like https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-simplebrowser-example.html ?

                  so I am quite confused with QWebEngine, QWebKit, QNetwork modules - what of them is most suitable for me?

                  QtWebKit uses the same engine as apple's safari browser. the module has been discontinued since Qt 5.6
                  QtWebEngine uses the same engine as google chrome and is used to interact with webpages html and the likes.
                  QtNetwork is much more low level and is used to manage network communication. You can use QNetworkAccessManager to interact with http but if you need to run html/css/javascript on webpages, you are in the wrong place

                  N Offline
                  N Offline
                  nikich340
                  wrote on 27 Dec 2018, 14:50 last edited by nikich340
                  #8

                  @VRonin Now I am able to download page and read its headers. I see that page has html content-type ([Content-Type]: text/html; charset=utf-8), with some elements of which I should interact. Is it real with QNetwork tools?
                  I can parse requested pages myself, all what I need is to send data in some html elements on current page.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 27 Dec 2018, 20:48 last edited by
                    #9

                    Do you want to show these pages to the user ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    N 1 Reply Last reply 28 Dec 2018, 12:24
                    0
                    • S SGaist
                      27 Dec 2018, 20:48

                      Do you want to show these pages to the user ?

                      N Offline
                      N Offline
                      nikich340
                      wrote on 28 Dec 2018, 12:24 last edited by nikich340
                      #10

                      @SGaist no, I will create gui elements based on parsed pages.
                      Well, if I want to interact with html, I have to use QWebEngine anyway..

                      1 Reply Last reply
                      0

                      1/10

                      24 Dec 2018, 02:29

                      • Login

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