We have developed a desktop application with Qt in Python language. We want to transform the desktop version to the web version.
For Qt 5.13 or higher, there is a plugin called WebAssembly, which uses Emscripten to do code translation.
Problem
We have installed Qt 5.13 and Qt 5.14, Web Assembly but we're having trouble getting Qt to recognize Emscripten. Either it does not recognize Emscripten or, if you recognize it, you do not understand the Emscripten directory.
Are we installing Emscripten wrong? Do we need to know any details?
Snapshots
Qt for WebAssembly is meant for C++, and not for Qt for python, even though python can run on WebAssembly, the python libs most likely won't ever be ported to WebAssembly, since is quite a technical challenge, also because Qt wasm apps are statically linked, and this poses a big problem for python libs. If your app relies heavily on QML, you should be able to port and run your app in the browser. If you want to do some quick testing you can use Felgo WebAssembly tools like the web editor https://felgo.com/web-editor or the fully fledged Web IDE https://ide.felgo.com
You have to run: source /path/to/emsdk/emsdk_env.sh prior to running QtCreator but within the same context if that makes sense.
Here's an example of how to fix this
Create the file em-qtcreator.sh in your HOME folder and do something like this:
#!/bin/bash
source /path/to/emsdk/emsdk_env.sh
/path/to/qtcreator
Now, just execute that script by using
chmod +x em-qtcreator.sh
./em-qtcreator.sh
This should allow QtCreator to auto-detect emscripten, otherwise you'll have to manually add the emcc compilers in the build configuration
Related
I develop applications with Netbeans on my Windows PC for the Raspberry Pi and build them remotely on the Raspberry Pi. Now I also would like to develop some GUIs with Qt. Because of remote building I need neither MinGW nor Qt modules (RPi of course has everything necessary installed), only Qt Designer to edit the Qt Forms.
How can I install Qt Designer only or at least with as little additional stuff as possible?
The easiest way would be to download a Qt binary, unzip it, then remove the parts used for compiling user code - i.e. leave only the bin, plugins, resources and translation folders. You can further pare down what's in the bin and translation folders.
The Qt standalone installer binary built with Qt installer framework which accepts scripts also, you can write scripts and customize which you want to install with those scripts, look here https://stackoverflow.com/a/21279733/4490542 and
https://stackoverflow.com/a/34032216/4490542
For anyone else ending up here. Here is a standalone installer someone made:
https://build-system.fman.io/qt-designer-download
I am developing an application and the main IDE is Eclipse Juno(CDT) on Red Hat Enterprise Linux 6.
I have the following constraints:
Application must be developed on Eclipse (Non-GUI part)
Must Use Qt4 for GUI
Application target platform is Red Hat Enterprise Linux Server version 6.3
I am new to Linux Development Environment, Eclipse and Qt.
What I have done:
I have developed the main application on Eclipse.
I have created modules like interacting with hardware as shared libraries.
What I want to do (if possible, and practical):
I want to create the GUI module of the application using Qt Creator, as a library and use it in the main application on Eclipse.
What I am trying:
Created the GUI in eclipse without using any .pro files or Qt Creator. But since I am new to Qt and Eclipse and Linux, and time constraints, I want to make it quicker, easier and well planned approach to complete the tasks. This looks very tedious (obviously) as I am better off using an IDE and visual tools to create GUI.
Can someone help me with the following:
Am I doing the things right, is my approach of creating GUI module as a shared library and using it in another application a naive approach?
If I missed out detailing anything or if you need more info please let me know.
Thanks.
While deciding for a cross platform language for a desktop application I want to do, I came across "wxwidgets" for C++. After testing a demo application in Mac 10.6.4 I noticed the application needed "Rosetta" to run.
My concern is: Will I always need "Rosetta" for a C++ application with wxwidgets to run on a Mac?
Note: Latest news about Mac dropping support for Java in future OS release (hoping Oracle will pickup were left) and the upcoming App Desktop Store will not support apps requiring Rosetta.
You can create Universe Binaries with wxWidgets. My guess is that your demo application was only compiled for PPC. (Which seems weird, actually. Was the app you tried one you built yourself from examples/, or just one you downloaded off the web?).
I've built Universal apps in wxWidgets both in Xcode (the easiest way to do it), and I believe it's not that hard with a Makefile on the command line. (you make the ppc version, make the intel version, and use the lipo command line tool to squash them together.)
Am new in Qt Programming and i would like to develop a program which i want to run in Windows, Linux(ubuntu), and Mac.
I heard that Qt support mutli-platform application development,
but my Question is that,
would any Qt library need to run these appilication in Ubuntu after i deployed or compiled?
If you deploy on Ubuntu, and therefore use a .deb package, then your job is easy since you just have to require qt as a dependency and apt will automatically install it as needed.
Windows and Mac however do not have any "good" software management layer, so you have no choice but include the required Qt DLLs with your binary or compile a static one. On Windows you just have to make sure the DLLs are in the same directory as your program. Mac however requires some relinking to be done. This is a big pain, but fortunately Qt comes with a tool named macdeployqt which does this for you.
So according to my experience, Linux is the easiest platform to deploy to, followed by Windows, and Mac is a good last.
The link to the Qt deployment doc given above is a good starting point. If you need an example, I have written a couple of scripts to build the Windows binaries of a program of mine. You can have a look at these to get started.
Windows installer:
http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/buildwin32releases.sh
http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/tagainijisho.nsi
Talking for the Linux side here, if you distribute your application as packages (deb, rpm) then you can use the package dependencies rules. If you define these rules correctly, then the package manager will install the Qt libraries you need when installing your application.
I need to give an estimate for porting a standalone program to a Mac from a .NET platform. I have all the source code which is in C++ and is both code I wrote and a modified version of GLUT/GLUI because the program uses OpenGL and GLUT/GLUI as a UI.
I don't think the C++ code will be a problem or the OpenGL environment, please tell me if you think it will be. In .NET, I use OpenGL32.DLL and deploy it with my app. I need to find out how this is done for a Mac?
I really need to know what the current deployment method is for Mac's these days and how hard it will be for me to write for it. For .NET, I use Visual Studio for the application development and deployment, I make a new VS project to build the deployable MS installer.
The deployment process also allows things like placing a desktop shortcut, associate a unique icon with the program ... What deployment options can one select on a Mac? What do you think the biggest obstacles will be?
There's no .NET framework calls within the code. The deployment phase produces a .NET assembly with all the security features. I think that is the main relationship with .NET since it is straight C++ not C#.
Development should be rather straight-forward. You'll be able to do OpenGL/GLUT/etc... through the Cocoa framework. Look at this example from Apple to see how it is done in code.
As for development tools, you will be able to use Xcode (which is free with the Mac). You can develop in C++ and compile with GCC.