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. Running Qt programs in a browser
Forum Updated to NodeBB v4.3 + New Features

Running Qt programs in a browser

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 4.8k 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.
  • C Offline
    C Offline
    cve60069
    wrote on last edited by
    #1

    Hello

    I am writing some simple structural analysis software using javascript and was looking for ways of attaching my programming to an open-source drawing program such as LibreCAD when I came across the Qt project which has all the tools I need for my scheme.

    How do I run a 'Qt project' program? At present, I run everything in a chrome-browser and I send all my code results to a simple HTML line. Eventually, I want my programs on my phone. Would I be able to test my Qt code using a browser or will I have to use a viewer, please? Do I still use 'script' and '<link>' pointing to my code on an index page?

    Regards

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Qt is a framework that uses 2 languages: C++ and QML. The QML engine is the part of Qt that understands JavaScript. (See "here":http://qt-project.org/doc/qt-5.1/qtdoc/qtquick-applicationdevelopers.html for an introduction to QML)

      Web browsers don't understand C++ or QML code, so they can't run Qt programs. However, if you do your coding in the Qt Creator IDE, you can just click the "run" button and your program will start running.

      To get started with Qt, download a Qt 5.1 SDK from http://qt-project.org/downloads and launch the Qt Creator IDE.

      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
        cve60069
        wrote on last edited by
        #3

        After I write my code, how do others execute it. Do I end up with an '.exe' type stand-alone program?

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Yes, you build an .exe and distribute it with some DLLs.

          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
            cve60069
            wrote on last edited by
            #5

            i note that the Qt site quotes html5 and css. Am I able to manipulate the browser window using Qt executables. If so, what about the firewall. Does my 'participant' using a PC or phone have to download a dll or 'app'.

            1 Reply Last reply
            0
            • JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              It really depends on your architecture. Can you describe your plan for "attaching my programming to an open-source drawing program such as LibreCAD"?

              See http://qt-project.org/doc/qt-5.1/qtwebkit/qtwebkit-bridge.html for a detailed description on combining HTML 5 + CSS 3 + Qt. In summary, you have two choices:

              • Web content in native applications
                ** Your user downloads the .exe and runs it on their PC/phone. The .exe can open websites that contain HTML5 content; the user doesn't need to use a web browser.
              • Thin clients
                ** Your user only needs to use their browser to open a website which acts as the GUI; the .exe runs on the server that hosts the website, and doesn't need to be downloaded by your user.

              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
                cve60069
                wrote on last edited by
                #7

                My plan is to run some structural-design software from a browser. I key in the dimensions, javascript does the code and sends the results to the browser. Data will be stored in LocalStorage. The code will then manipulate a 2D drawing which I will mirror to the browser (like AutoLisp and AutoCAD). I have written most of the javascript code but did not want to reinvent the wheel for the 2D drawing and thought of plagiarising LibreCAD. I want the code to be small.

                Thanks for the thin-client description; always wondered what it meant.

                spencintiS 1 Reply Last reply
                0
                • C cve60069

                  My plan is to run some structural-design software from a browser. I key in the dimensions, javascript does the code and sends the results to the browser. Data will be stored in LocalStorage. The code will then manipulate a 2D drawing which I will mirror to the browser (like AutoLisp and AutoCAD). I have written most of the javascript code but did not want to reinvent the wheel for the 2D drawing and thought of plagiarising LibreCAD. I want the code to be small.

                  Thanks for the thin-client description; always wondered what it meant.

                  spencintiS Offline
                  spencintiS Offline
                  spencinti
                  wrote on last edited by
                  #8

                  @cve60069 Did you accomplish what you set out to do? I'm interested in executing something similar with LibreCAD.

                  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