Qt error with reMarkable tablet app - qt

I have a reMarkable tablet , which I mostly love except for the lack of linux support (surprising given it is a linux-based OS). However, I've managed to find a version of a linux application that is now unofficial. This github is actually a Qt docker app, but if you look in the code for the 'Dockerfile' you can find where to download the app, which is apparently still on the server even though there's not a link from the main web page. Anyway, I downloaded it and got it mostly working, figuring out a few dependencies based on same Dockerfile code. But, I can't seem to get file dialogs to work, which is the main reason for using the app.
The error I get is:
ERROR: No native FileDialog implementation available.
Qt Labs Platform requires Qt Widgets on this setup.
Add 'QT += widgets' to .pro and create QApplication in main().
I'm not a Qt developer, so I'm lost. I'd love to get this to work. Thanks.

In the .pro file of you project you should add this line QT += widgets
or just add widgets to the line with QT += ...

Qt can use native file dialogs on some platforms, and will fall back to its own implementation if none is available. But that requires that the application is built including the QtWidgets module, and using a QApplication.
If you don't have the source code of the app and a possiblity to rebuild it, there's no chance to fix this from a binary

Related

How do I make QtCreator 4.2.2 include webkit related files

I've pretty much tried every proposal on solving this question that's on the entire internet but to no avail.
I'm using Qtcreator 4.2.2 on Windows 10, trying to make a program that must use a webview (of any kind) -- so far, I've tried using the QWebView and QWebKit stuff but it consistently refuses to recognise that I have the modules installed. I've verified that the dll, header and .pri files do exist in the system. I've tried using the MSVC and MinGw compilers, all with the same result; if I add web* to the QT variable in the project file, qmake claims the modules do not exist. None of the web stuff appears in the UI designer; neither for regular forms nor for qml.
How do I fix this? Is there some magic stuff that I have to do, that's not documented anywhere or am I just blind?
Edit: I've successfully created a program using QtCreator packaged in Fedora 26, that uses QWebView.
It has nothing to do with Qt Creator, it just depends on which Qt version you have.
First Qt WebKit is not distributed since Qt 5.6, it has been replaced by Qt WebEngine.
Qt WebEngine does not support MinGW, so you are required to use MSVC. (Looking at my Qt installation it seems it is also the case for WebView)
See: http://doc.qt.io/qt-5/qtwebengine-platform-notes.html#windows
Finally, Qt WebEngine is displayed as an optional module in the Qt Maintenance Tool, so you need to explicitly select it.

How to debug/step into QT SDK sources from my project

I want to debug, set break points etc in QT SDK sources,
I have QT5.5.0 built with symbols and symbols are picked up, at lest GDB says so.
But I still cannot debug into for Example QGuiApplication, well I don't really care about QGuiApplication but I want to be able to set break point anywhere in QT Sources and stop there when my code get there.
I do have QT 5.5.0 project opened alongside with my project, but setting break point in QT5.5.0 does not have any effect, also stepping into any QT SDK code simply does nothing, it just stays where it was stopped by breakpoint in my project.
So question is how can I place breakpoints in QT SDK code anywhere I want and when I debug my project I will be able to stop in QT code. And how can I step into QT SDK code.
Ubuntu 14.04, QT 5.5.0, Creator 3.6.0, QNX ( ARM platform ) but it is irrelevant.
Don't install any QT binary (qtcore/qtgui),
build from source and
intall them with debug symbols, should be around 200~300M each library.
Make sure your example code is loading the debug version of qt files.

Qt build for Wince works, but no plugins or import work

I've got Qt build for a CE 6 custom sdk. I can use VS2005 and a KITL connection and run several of the Qt examples successfully on the device. I can also run examples if I copy all of the Qt dll's into a directory with the .exe on a USB drive and attach it to the device.
However, it seems that anything that uses QTDIR to find the location doesn't work (plugins and QML imports). I was able to get some QML examples to work if I included the qml in the project as a resource file.
Nothing I've tried works (including copying the plugins/imports to a directory with the dlls). I can't set QTDIR, as wince doesn't have environment settings.
I was able to get a little further with a static build vs. shared, but I believe that "nice stuff" like QtWebkit and QtMobility won't be available for static builds.
Is there some secret to deployment on wince that I'm missing?
Tracked it down. In src/corelib/io/qfilesystemiterator_win.cpp there is a code chunk:
if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) {
dwAdditionalFlags = 2; // FIND_FIRST_EX_LARGE_FETCH
infoLevel = 1 ; // FindExInfoBasic;
}
The enums for windowsVersion for wince (6.0) are different, causing this to trigger as true instead of false. Wrapping the above code in
#ifndef Q_OS_WINCE
...
#endif
fixes the problem.
Note, I found a git repo for Windows Embedded Compact 7 patches that (as of 4.8.0) is not included in Qt. This fix is one of the changes. Check out https://qt.gitorious.org/qt/jaanttils-qt/graph/WEC7_Patches if you are working on 4.8 and wince (even CE 6). I needed a handful of changes on top, but I think they were specific to the sdk I'm using.

Netbeans Platform Installer and JOGL

I'm trying to build an application that uses both Netbeans Platform and JOGL. So far, it runs fine from within Netbeans, but once I try to create an application that can run externally, I get some problems. The application will start (judging from the splash screen), but a window never displays, and I never get an error message. As soon as I remove the JOGL module (leaving only straight Swing code), everything works fine.
Project Setup:
1 Library Module for JOGL, including the dll's (for Windows 7 64 bit only), in the library/modules/lib folder
1 Module for a window displaying a GLJPanel, rendering a simple image with an animator
1 Module with a simple form in Swing
Has anybody seen this before?
Edit: apparently the trick in this case (using native libs when building Netbeans Platform executables) is placing the native libs in the project's root folder.
If this were not about netbean platform executables, a more generic comment is to make sure the native libs (dlls) are picked up correctly. Try adding the
-Djava.library.path=/path/to/libs option when you run it.

Deploying QT app on OS X and linux

Whats the best way to deploy a QT app? I've read the documentation hosted at trolltech but is it better to link with a static library or the dynamic libraries and have the user install the framework? I don't really want anyone using my app to have to download a 160mb framework just to run a simple gui frontend.
On OS X it's a good way to do a dynamic build and post-process the resulting ".app" with the macdeployqt tool which comes with Qt starting with 4.5.
This will copy the Qt frameworks used by your application into the application bundle, which results in a larger package than building a static version of your application.
Here is what you can do to make sure you get the smallest file size possibly in a dynamic build:
First off, make sure you only include the stuff you need (in the project.pro file's QT += core gui network xml lines).
Open the application bundle and remove any unneeded "Qt Plugins" from the bundle. macdeployqt automatically compies all the Qt plugins in there, which can be kind of bulky.
Make sure you are building your application in release mode. Otherwise your application might be linked against the debug libraries of the Qt4 framework, and they are really big (for instance, well over 90 MB for the debug library vs. 16 MB of a release variant without debugging symbols). This might be what happened in your case.
If you have a large application binary, you can use UPX to compress your executable file by 40-50%.
Other than that, you should use compressed disk images to deploy your application.
One of my projects uses QtGui, QtNetwork, QtCore and QtXml and the resulting bundle is about 16 MB in size.
Hope that helps.
Unfortunately you will have to include the Qt libraries you need into your own bundle, as you cannot expect your users to have Qt installed on Mac (whereas on Linux packaging systems allow you to require at least a given version of Qt.
There is a nice tool to help you with that, which is called macdeployqt. You just need to invoke it on your bundle application and it will pack the required libraries, changing the linkage of your binary to refer to them. Without it, making bundles for Mac is a real pain (it still is, but considerably less though).
http://doc.trolltech.com/4.6/deployment-mac.html#the-mac-deployment-tool
Afterwards, you can make a .dmg image as you would do with any other app. There is an option in macdeployqt that builds a basic one.
On Linux, it's better to rely on the OS's copy of Qt, as it's almost certainly installed - for OS X, almost all apps use a statically compiled library.

Resources