sudo apt-get install qttools5-dev-tools
sudo apt-get install qtbase5-examples qtbase5-doc-html
This could happen for some projects that are not configured for cross compilıng:
“Cannot run: No command given.”
.pro file needs target path and install command. add proper targets and re-run qmake.
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
Permission issue on QtCreator when trying to run on RaspberryPI remotely:
cd /opt
sudo chown -R pi: opt (Qt deploys binaries to this folder and default user pi needs permssions to write here)
OpenGL Issue On RaspberryPI with QT5:
int main(int argc, char *argv[])
{
//first set the flags
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
QApplication a(argc, argv);
Dialog w;
w.show();
return a.exec();
}
OpenGL can'T determıne screen sıze on target:
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
14:10:10: Remote process crashed.
Do this; On Target:
export QT_QPA_EGLFS_PHYSICAL_WIDTH=1024
export QT_QPA_EGLFS_PHYSICAL_HEIGHT=768
export QT_QPA_EGLFS_DEPTH=24
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
14:14:24: Remote process crashed.
Possıbly ran out of memory; on target:
ps aux
kill processid (process stuck at the background)
