TestApplication with Qt5.9 and embedded linux on Raspberry Pi 3 - qt

Setting up Qt5.9 on my RaspberryPi3 with raspbian-lite version of image.
Next compile test application qtbase/examples/opengl/qopenglwidget
With run I can see next message
QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
Application was running, but there is no any text.
I want to use standard fonts, but I don't now how I can do it.
OR, How to use FREE-Types from http://dejavu-fonts.org.
Please help me, somebody

I found right answer. It was very simple:
You must add any font (*.ttf) in-to directory /usr/local/qt5pi/lib/fonts on raspberryPi. For example, I use free fonts from
http://dejavu-fonts.org.

Related

SVG icon is not showing up in a Qt, portable application under Ubuntu

For some reason, I want to publish my application as a portable one. That is, avoiding the pre-installed shared libraries and use my own ones, shipped together with the app.
Long story short. Following the advises on this helpful page, I found that the window icon, which is an svg, not showing up in the foreign computer. What did I miss?
Turns out a shared library it needs cannot be found.
In Windows, you have to put Qt5Svg.dll in the same folder of the exe. And in Linux, besides the libQt5Svg.so.5, iconengines/libqsvgicon.so is also needed.

Google NaCl with Qt on Windows

I have a project which is using Qt 4.7.4 version (also I can't rebuild it using qt4.8 or qt5 – there are a lot of errors appears, project is big and not mine so fixing issues would be even harder than erasing the whole code and write new code). So I need to make this project, well, working on NativeClient.
Is it even possible? I use Windows and Visual Studio, I was trying to google instructions about qt+nacl on Windows but just can’t find nothing.
Also which pepper version should I use if it depends on it?
Is your qt build supporting native client?
Please check out this
Windows
The Qt-Nacl is not support, for now, in Windows.
By the way, here is the github repository dedicated for it -> https://github.com/msorvig/qt5-qtbase-nacl
In the file nacl-readme it is written :
[...] Windows is not supported as a host platform.
Linux
If you want to compile in Linux, I have made a script that will compile Qt5.4 with NaCl with all the dependencies needed.
https://gist.github.com/theshadowx/438297ac465874a5e226
I also made a video that will show the different steps and a showCase at the end :
https://www.youtube.com/watch?v=q2pMv1Svtqw

Sublime Text 2 - Changing the icon on Windows

As the title says, how do you change Sublime Text 2 default icon on Windows(7 or 8)?
I've searched everywhere. I found the post by Jeffrey Way on Nettuts that explains how to change it on the Mac and it was as simple as putting the 'nameoftheicon.icns' file somewhere in the default folder.
Now I have two problems:
1) I can't find the folder where the icns file should be put in
2) on Git(or somewhere else) when I find the repo of an icon the things to do in order to change it, even on the Mac, are way longer than Jeff's post
I wish the Windows folder was specified in that post to but it isn't(as you know he works on Mac).
So basically what's the fastest way to change the icon, maybe just by putting the icns files somewhere and avoiding the download of external software(as some Git repos suggests)?
There is no way of changing the icon on Windows without editing either the sublime_text.exe file or one of the libraries with an external program. It's just one of the many, many differences between Windows and Mac. .icns files are specific for the Mac platform, and don't exist in the Windows versions of Sublime Text.
There is no easy/fast method to change an application icon once its been compiled, however you can use a tool like Resource Tuner to alter the resources embedded within it.
Its worth noting that if you do use Resource Tuner it only supports 32bit binaries which means you will need to modify the 32bit version of Sublime. You can adjust the four icons defined there (16,32,48 256), you will need to create your own individual ICO files for each 32bit resource, import them using resource tuner and then save our .exe
An altered 32bit version of the .exe and .ico resources are here : https://copy.com/S7kKk6rh2Q3P12iu (nothing malicious however use at your own risk)
suggest https://github.com/dbmzzo/Sublime-Text-2-Icon
may help. BTW, it provide solution of changing icon in Win\Ubuntu\Mac

Qt - QImage works on one computer and not on another [duplicate]

I set a background image(JPEG) on a Qt widget using setStyleSheet(). This is perfectly shown on my computer, but not on another computer.
I am not getting a link error on the other computer -- the feature just doesn't work. Is there something I am missing in the distribution or build of my app, something that the Qt dev tools installs or is otherwise available, that isn't present on other machines? How can I distribute a Qt app that uses JPEG functionality?
JPEG support in Qt comes as a plugin. Make sure you have also deployed the plugin to your non-development machine. If you haven't, it will simply silently fail and you'll end up not seeing any of the JPEG images. Have a look at the official documentation for more detailed information: http://qt-project.org/doc/qt-4.8/deployment-windows.html
In short (and as a quick solution, but have a look at the documentation as well) you could create a directory named "imageformats" as a subdirectory of the folder containing your exe, into which you copy QJPEG4.dll.

Qt: QWebview not displaying jpg, gif, png images on another machines

Today I came across a very strange error with QWebView which I cannot resolve myself.
I included a QWebView widget in my application. When I set a URL or a piece of HTML code to display (with QWebView::setUrl() or QWebView::setHtml()), it works very well on my machine. It also works on all machines that have Qt installed, but not on those without it. I compiled a release build and included all necessary libraries as shared (QtWebKit4.dll, QtNetwork4.dll etc.), so I guess my error lies in that I forgot to include some libraries.
If anybody has already had such an error, I would be very grateful for help!
You might need to include the relevant Qt image processing plugin libraries, which are located in qt/plugins/imageformats (and maybe also qt/plugins/iconengines ). I haven't deployed any webkit apps, so I'm not certain about this.
See my answer to this question: Qt dll deployment on windows

Resources