Error executing cross-compiled codes in raspberry pi - c++

I am having problems with a Qt GUI application I created. Basically I created the application in my ubuntu to check if it compiles and works properly, however, if I set up the cross compiler (followed a tutorial and tried a hello world which works properly) and execute my code in the pi the UI does not display properly and basically I cant do anything:
· Text disappears from buttons
· Mouse disappears from screen (therefore cant click buttons)
· Cant navigate buttons using tab key
Any clues? maybe I cant use .ui files in the pi and have to use qml? Thank you in advance.
2 Screenshots of what I get with the pi and what the program should actually look like (ignore the second LCD display):
what I get http://imageshack.us/a/img17/9986/img20130508093318.jpg

I’ve been told that Qt5 has different rendering platforms, the standard for my compiled version is “eglfs”, which is fullscreen EGL accelerated mobile application style. I need to run it another platform for example xcb or x11 with the command “./myprogram -platform xcb”. Unfortunatelly i only have the following platform options and none of them work: eglfs,linuxfb,minimal,minimalegl,offscreen. I dont now how to install these, i’ll google it see if i can find anything.
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=26590&p=321556

Related

Application Qt and Qwt won't run from menu

Greetings for the first time:
Usually I can work my way through problems like this but I think I need help for this one.
I have developed a small utility for myself to plot some data using Qt and Qwt under Mint. When I run the application from Qt Creator everything works fine. Once I added (export LD_LIBRARY_PATH="/usr/local/qwt-6.1.3/lib") to my .bashrc file, I can invoke the application from the terminal with “./PlotAccountsChange” and it woks. Also the ldd command shows all dependencies have been found.
The problem I am having is that the application can not be invoked from the Nemo file manager, or from the menu system if I add the link to the executable in the menu, or from a link to the executable placed on the desktop. In all of these cases I get no indication at all, just nothing happens. Any other application that I have created using Qt but that doesn’t use Qwt invokes without problems.
Thank you, regards,
B Kace

Wrong coordinates in a Qt Application

I created a Qt Application with Qt Creator 3.3.1, using Qt embedded 4.8.6 for a Cortex A5.
It runs on a board with Linux embedded and a touchscreen.
The filesystem was created with Buildroot 2015.08.
I'm using a resistive touchscreen calibrated with ts_calibrate.
The Qt Application works, but I often get the wrong coordinates. For example, when I push on a button, sometimes the program takes the coordinates related to another point of the touchscreen, giving the idea that the button pushed doesn't work properly.
My Qt enviroment variable are:
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/etc/ts.conf'
export TSLIB_PLUGINDIR='/usr/lib/ts'
export TSLIB_TSDEVICE=`cat /etc/ts.dev 2>/dev/null`
export QWS_DISPLAY=LinuxFB:mmWidth=800:mmHeight=480
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
If I try to use another Qt Application (for example the Qt demos created with Buildroot) I get the same problem.
Is it a bug of Qt 4.8.6 or something?
Can anyone help me? Thank you
Sounds like playing with your activated filters or their parameters in ts.conf might help.
Since you asked your question, there is tslib 1.2 and (if you need multitouch) tslib 1.3-rc3, both with new and improved filters, see tslib's project page

Pyside fail to show tooltip and specific events in Linux

I wrote a PySide application that should run on python2.7, on window,Linux and Docker container. The application contains Qtooltip and specific eventFilter that catches HoverEnter\HoverLeave.
The application works well on windows 10 and ubuntu 14.04 desktop but when trying to run it inside Ubuntu 14.04 container both features didn't work well:
The tooltip - It would seem that the text is covered by other tooltip text or totally black.
The eventFilter - The application can't get the hover event (didn't appear).
The main difference that I saw was that when running on Ubuntu desktop, some GTk libraries are loaded to the python process (according to the maps files).
I tried reproduce the problem by installing everything on Ubuntu server (without Gtk), and got the same effect as inside the container.
Even after installing Gtk on the server, still no change.
I think that I might have missed some dependencies, but can't find any documentation on the issue.
Thanks in advance,
Ok, after several days of trying figure that this is what was needed:
For the tooltip problem:
Adding WA_AlwaysShowToolTips
Change the stylesheet show that the transparent feature will work only for the QPushButton background and not the entire widget.
For the event problem:
Add the attribute: WA_Hover
Everything worked as should be after that

xdotool cannot find Qt application window, where wmctrl can

I want to detect a Qt5 QWidgets application from its
window title using xdotool to test the GUI under GNU/Windows with the latest Xubuntu LTS distro.
When I create any minimal Qt application, with wmctrl -l I can detect it,
with xdotool it cannot be found, as shown here:
(note that searching for Enter s also fails)
Does anybody have a good experience with using xdotool on Qt QWidget applications,
without using tricks like grepping through the wmctrl scripts?
AFAIKS, I am not the only
one that has problems with this combination.
Sadly, I do not know which update caused this, but one day after the question, suddenly everything works as expected:
xdotool can detect Qt windows with spaces in its name as expected.

Qt Deployment - QGraphicsView not displaying on other machines

So I've been making a program for my company using Qt 4.8.4 (required). When deploying the project to a different machine, the program runs fine (I included Qtgui4.dll and Qtcore4.dll). However, when trying to view a print preview image using QGraphicsView, no other machine will show it. I even tried installing Qt 4.8.4 on the other machine and building it there to no avail. I use MSVC to compile and have installed Visual Studio on the new machine as well. I also include the imageformats folder when deploying the .exe to other machines.
I am at a loss here. I've researched this for days. I don't understand why it runs perfectly fine on my machine but will not run on others even when I replicate the development environment.
I have attached a picture of it actually working.
On all other machines, the preview image shows blank/white. However, I noticed that the image is built and that it will print. It just will not preview.
I know I haven't included any code but I won't be able to include much as it's for my company. But I have included what I could related to the QGraphicsView.
// Create a handle for the graphics view; fix bug where preview would disappear
// on first view; winId() creates the winId; Needed to initialize first
ui->graphicsView->winId();
/************************************/
if (preview)
preview(ui->graphicsView->winId(), &err);
No solution was found on my end. I finished the application with the stipulation that the OS could not be XP.