Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.1k Topics 62.5k Posts
  • 5.4 final - Andoid examples not running

    3
    0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi, That could be something you could suggest as a feature request on the "bug tracker":https://bugreports.qt.io/
  • Rotate display 180 degrees (Widgets/EGLFS)

    5
    0 Votes
    5 Posts
    3k Views
    X
    It was definately my mistake. The screen did properly rotate after I fixed that. I'm surprised that I didn't have to rotate the resistive touch sense 180 as well (which I know can be done with an environment variable) - it just worked! The mouse not being rotate is a bit odd, but this is a non-issue in our application. Laszlo, thank you!
  • WinPhone: Qt.exit() doesn't close app

    1
    0 Votes
    1 Posts
    587 Views
    No one has replied
  • How to open image from gallery using Android Extras?

    1
    0 Votes
    1 Posts
    627 Views
    No one has replied
  • Will Qt Multimedia Widgets be supported in the future for Android?

    3
    0 Votes
    3 Posts
    1k Views
    V
    Nice question ! I wait the answer also...
  • Controlling GPIO's with qt

    9
    0 Votes
    9 Posts
    11k Views
    S
    if you work on linux you must know that every thing in linux is file. you must write the linux device driver and load as module the you can call that as open file and write your command in that file. file gpio.h #ifndef GPIO_H #define GPIO_H #include <qstring.h> #include <qobject.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> //Header pin number definitions #define PIN9 160 #define PIN10 161 #define PIN11 162 #define PIN12 163 #define PIN13 164 #define PIN14 165 #define PIN15 166 #define PIN16 192 #define PIN17 193 #define PIN18 195 #define PIN19 197 #define PIN20 198 #define PIN21 199 #define PIN22 201 #define PIN23 202 #define PIN24 203 #define PIN25 139 #define PIN26 140 #define PIN27 141 #define PIN28 194 #define PIN29 142 #define PIN30 143 #define PIN31 32 #define PIN32 33 #define PIN33 233 #define PIN34 234 class GPIO : public QObject { Q_OBJECT public: GPIO(int pin); //pin is the pin nuber on con4 of the FriendlyARM board ~GPIO(); enum Direction {In,Out,Err}; int openPin(); int closePin(); int setDirection(Direction direction); //set direction in/out. returns 0 if ok and -1 on error int getDirection(); //returns direction int setState(bool state); void setValue(bool value); bool getState(); public: private: Direction _direction; int _state; int _pinNumber; QString _directionString; QString _valueString; QString _strPin; }; #endif // GPIO_H file gpio.c #include "mini2440Gpio.h" //------------------------------------------------------------------------------ GPIO::GPIO(int pin) { _pinNumber = pin; _valueString = QString("/sys/class/gpio/gpio%1/value").arg(pin); _directionString = QString("/sys/class/gpio/gpio%1/direction").arg(pin); _strPin = QString("%1").arg(pin); } //------------------------------------------------------------------------------ GPIO::~GPIO() { FILE * fp; //This will create the folder /sys/class/gpio/gpio37 if ((fp = fopen("/sys/class/gpio/unexport", "ab")) == NULL) return; rewind(fp); //Set pointer to begining of the file fwrite(_strPin.toLatin1(), sizeof(char),_strPin.length() , fp); fclose(fp); } //------------------------------------------------------------------------------ int GPIO::openPin() { FILE * fp; //This will create the folder /sys/class/gpio/gpio37 if ((fp = fopen("/sys/class/gpio/export", "ab")) == NULL) return -1; rewind(fp);//Set pointer to begining of the file fwrite(_strPin.toLatin1(), sizeof(char),_strPin.length() , fp); fclose(fp); return 0; } //------------------------------------------------------------------------------ int GPIO::closePin() { FILE * fp; //This will create the folder /sys/class/gpio/gpio37 if ((fp = fopen("/sys/class/gpio/unexport", "ab")) == NULL) return -1; rewind(fp);//Set pointer to begining of the file fwrite(_strPin.toLatin1(), sizeof(char),_strPin.length() , fp); fclose(fp); return 0; } //------------------------------------------------------------------------------ int GPIO::setDirection(Direction direction) { //set direction in/out. returns 0 if ok and -1 on error FILE * fp; if ((fp = fopen(_directionString.toLatin1(), "rb+")) == NULL) return -1; rewind(fp);//Set pointer to begining of the file if(direction == In) fwrite("in", sizeof(char),2, fp); if(direction == Out) fwrite("out", sizeof(char),3, fp); fclose(fp); return 0; } //------------------------------------------------------------------------------ /* int GPIO::getDirection() {//returns direction }*/ //------------------------------------------------------------------------------ int GPIO::setState(bool state) {//state is 0 or 1. No effect if other value. returns the new state or -1 on error FILE * fp; if ((fp = fopen(_valueString .toLatin1(), "rb+")) == NULL) return -1; rewind(fp);//Set pointer to begining of the file if(state) fwrite("high", sizeof(char),4, fp); else fwrite("low", sizeof(char),3, fp); fclose(fp); return 0; } //------------------------------------------------------------------------------ bool GPIO::getState() { //returns 1 or 0 - the pin state. Returns -1 on error FILE * fp; char value; if ((fp = fopen(_valueString.toLatin1(), "rb+")) == NULL) return false; rewind(fp);//Set pointer to begining of the file fread(&value, sizeof(char),1, fp); fclose(fp); if(value=='1') return true; if(value=='0') return false; return false; } //------------------------------------------------------------------------------ to use gpio class you just declare like this: GPIO test = new GPIO(PIN32); test->openPin(); // open pin test->setDirection(GPIO::Out); // set direction to output test->setState(false); // set value to low. test->closePin();//close pin delete test; // delete pointer to avoid leak memory. Have funs!
  • [Solved] qt 5.3 and Android

    4
    0 Votes
    4 Posts
    3k Views
    ?
    I have same issue. Cannot inderstand your solve. What do you mean under clear install, clear configs? [quote author="RiseOfDeath" date="1397033006"]Clear instal, with clear configs solve problem.[/quote]
  • [SOLVED] How to get the app data path?

    4
    0 Votes
    4 Posts
    2k Views
    SGaistS
    You're welcome ! If that answers your problem then please update the thread title prepending [solved] so other forum users may know a solution has been found :)
  • Using getRssi from QAndroidJniObject (Qt Widget)

    1
    0 Votes
    1 Posts
    871 Views
    No one has replied
  • Unable to get the keyboard and mouse pointer in QT application

    8
    0 Votes
    8 Posts
    3k Views
    T
    I needed to add one more line in my parameters: export QT_PLUGIN_PATH=/opt/qt/plugins along with export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/qt/plugins/platform and it worked with out any error.
  • How to separate "wince" and "windows" in .pro files?

    2
    0 Votes
    2 Posts
    640 Views
    A
    for qt 5.3 ... TARGET = foo wince*: { SIGNATURE_FILE = somepath\customSignature.pfx } ...
  • 【Qt5.4 for wp8.1】 How to show a picture picker?

    1
    0 Votes
    1 Posts
    508 Views
    No one has replied
  • Qt app on Android x86

    3
    0 Votes
    3 Posts
    2k Views
    S
    Thanks for your reply. I've tried to use the pre built toolchain and my custom build. Both don't work. The most interesting I've got different errors in different parts of code: when throw std::exception, when qt parse qml file, et al. So I'm searching x86 tablet with android for testing... :-)
  • Embed qml View into iOS native app in Qt 5.4

    3
    0 Votes
    3 Posts
    1k Views
    F
    Thank you very much! I'll try that. [quote author="SGaist" date="1420069297"]Hi and welcome to devnet, You can try to rebuild Qt 5.3 for both architectures. However, if you have a simple example that shows what might be a regression then please go to the "bug report system":http://bugreports.qt-project.org and create a new report providing a minimal compilable example showing the behavior.[/quote]
  • [Solved] Can i use QSerialPort in android?

    7
    0 Votes
    7 Posts
    2k Views
    M
    I have the same problem with qt5.4, if i'm trying to use QT += serialport in my .pro i got : @ erreur : Unknown module(s) in QT: serialport @ in Qt creator when i'm trying to deploy on android. If i choose to deploy on desktop i have no error and i can compile ! Do you have an idea to resolve this ! For information i use qt5.4 32 bits and i'm under ubuntu 14.04 LTS 32.
  • Fast Graphics for Emdebian Kernel on BeagleBoneBlack

    1
    0 Votes
    1 Posts
    506 Views
    No one has replied
  • List view with fixed sections

    2
    0 Votes
    2 Posts
    628 Views
    p3c0P
    Hi, If you want to implement it in QML, then you can use "section":http://doc.qt.io/qt-5/qml-qtquick-listview.html#section-prop property of "ListView":http://doc.qt.io/qt-5/qml-qtquick-listview.html You can find an example "here":http://doc.qt.io/qt-5/qtquick-views-listview-sections-qml.html
  • 0 Votes
    6 Posts
    2k Views
    SGaistS
    Looks like there's no bearer plugin loaded, are they properly installed ? The QT_DEBUG_PLUGINS is mentioned in the Deploying Plugins chapter
  • How to embed SDL_Overlay to QWidget/Qlabel ?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [SOLVED] Set Android App Showing Name

    6
    0 Votes
    6 Posts
    2k Views
    M
    Thank you very much DOOMer, It solve the problem. Regards