Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT embedded simulate (up,down,left,right,enter) navigation

QT embedded simulate (up,down,left,right,enter) navigation

Scheduled Pinned Locked Moved Mobile and Embedded
color depthdpiembeddedframebufferresizescale
34 Posts 2 Posters 13.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BluTiGeS
    wrote on 1 May 2015, 12:29 last edited by BluTiGeS 5 Jul 2015, 09:20
    #1

    Hello,

    I am new to the QT embedded development and I have few problems:

    I am currently developing on a different target display which has a resolution of 640x480 pixels and 96 dpi using /dev/fb0.
    But the new target display has a color depth of 1 (black/white) and 240x128 dots per inch.
    Now my question is how can I simulate the new target display size on the the old one with the higher resolution? Is there any way of scale or zooming to fit the size, it later will have (real physical Millimeters), including Buttons etc?

    Here is a example how it Looks now:
    http://www.bilder-upload.eu/show.php?file=5e32bf-1430483434.png
    and this way i would have it (zoomed/scaled to full width)
    http://www.bilder-upload.eu/show.php?file=980a99-1430483686.jpg

    Is it possible to set color depth to black white for the LinuxFB
    for e.g.

    ./my_app -qws -display LinuxFb:/dev/fb0:depth=1 ?

    Can QT handle a membrane button touches? For example a 5 keys keypad, to handle the menu and input navigations?

    Many Thanks in advance

    Regards

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 May 2015, 23:47 last edited by
      #2

      Hi and welcome to devnet,

      Since you are working with Qt 4, you could use QVFB to develop the GUI at the right size on your desktop machine. As for the the depth, IIRC, you must build Qt with support for it.

      Is your keypad seen like a keyboard from a device point of view ?

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BluTiGeS
        wrote on 3 May 2015, 13:29 last edited by BluTiGeS 5 Mar 2015, 13:29
        #3

        Hi,

        thank you for your response ;) and first help

        • Okay for the depth I could try to cross compile it again with the depth 1 flag, maybe it shows up correct after that.

        • Is there no direct way to scale it direct on the current embedded dev/fbo screen?
          I have read with qvfb there is a flag -zoom, is this also available for /dev/fbo ?
          Would be nice for demonstrating and get a feeling of the size.

        • The Keyboard will be seen as normal device, as far as I know at the moment.

        Many Thanks for upcoming further help.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 3 May 2015, 21:51 last edited by
          #4
          • You can set several depth IIRC
          • I don't remember of such an option
          • Then unless it gets a special name, you should see its input in your software

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            BluTiGeS
            wrote on 5 May 2015, 14:36 last edited by
            #5

            Hi,

            thanks again for your response.

            I have done a sample application with a OnScreen Navigation (up, down, left,right,enter).
            But now I having problems to navigate on the Window.
            I tried to use for each button a different Event in the regarding slot :

            Mainwindow:

            QKeyEvent *event = new QKeyEvent( QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier);
            QCoreApplication::postEvent (this, event);

            Am I thinking wrong? or how can i use the virtual onscreen mini keypad to navigate on the Windows, Dialogs etc?

            Many Thanks

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 6 May 2015, 07:35 last edited by
              #6

              Why are you generating key events ? You should receive them from your keyboard in your application and then in your application handle them.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • B Offline
                B Offline
                BluTiGeS
                wrote on 6 May 2015, 07:52 last edited by
                #7

                HI,

                I am using a Touchpanel for demonstration purpose, but in fact later it will not have touch functionality.

                So i have added 5 Buttons (touchable left,right etc.) and if i press on one of these buttons the GUI (seperate widget) should then for example scroll down, mark a button click a button if i use the virtual keys.

                I handle the touch events to see which one was pressed (left right etc.) and then executing the regarding Key Event.

                But nothing happens in the widget. I thought qt can handle that easily if i trigger the KeyEvent, but it seems not to do it like I hoped.

                So how can i achieve a navigation with my tocuhbuttons which are simulating the final embedded config?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 6 May 2015, 21:55 last edited by
                  #8

                  You should rather make a virtual input panel like described in the "Input panel example". That would be more accurate with the final setup of your device

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    BluTiGeS
                    wrote on 7 May 2015, 05:34 last edited by
                    #9

                    Is it possible with that input panel to navigate through the windows and pages ?

                    Because I need to handle all input's navigation s with a 5 keys pad.

                    Many thanks

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      BluTiGeS
                      wrote on 7 May 2015, 09:22 last edited by
                      #10

                      Hi,

                      i found in the net some hint using the configure switch -D QT_KEYPAD_NAVIGATION and set the nav mode QApplication::setNavigationMode.

                      But if i try that approach I get setNavigationMode is not a member if QApplication.
                      Is this in anymore? I am using latest QT 5.4 creator and cross compile to embedded with 4.8.6 qmake target.

                      Please help me, i am getting confused here. Since I think i am not the only one who just has keypad for navigation.

                      Regards

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 8 May 2015, 19:44 last edited by
                        #11

                        setNavigationMode is still there but requires QT_KEYPAD_NAVIGATION to be defined when when building Qt

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          BluTiGeS
                          wrote on 8 May 2015, 19:57 last edited by BluTiGeS 5 Aug 2015, 20:14
                          #12

                          HI,

                          i have set this flag for my cross compiled qmake configuration QT4.8.6.
                          So how to configure qt creator QT5.4.1 to handle this QT_KEYPAD_NAVIGATION?

                          Do i need to configue the sources for my Ubuntu ?
                          like ./configure -v -D QT_KEYPAD_NAVIGATION
                          make -j 4
                          sudo make install

                          ?

                          will it then be recognized, as QApplication function?

                          Maybe this picture helps to understand which my target platform is similar to:
                          http://emsystech.de/wp-content/uploads/2012/09/raspi-lcd-1.jpg

                          Is Qt able to get interaction with input fields/combo boxes etc. and menu navigations with only these 5 buttons?

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 8 May 2015, 20:17 last edited by SGaist 5 Aug 2015, 20:28
                            #13

                            Yes thats that but there's something puzzling me, why are you developing with Qt 5 on your desktop and run 4.8.6 on your device ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              BluTiGeS
                              wrote on 8 May 2015, 20:26 last edited by
                              #14

                              Well I just downloaded the latest QT total package and that had QT 5.4.1.

                              I need to use 4.8.6 as cross target because the target is not really running with qt 5.4.1 it gives DBUS errors etc.
                              So I wanted to start keeping the working 4.8.6 as a base to go on.

                              So maybe I can configure qt 5.4.1 with this KEYPAD define and keep the configured cross 4.8.6 qmake?
                              Are you seeing any issue with this?

                              Or what would you suggest to get qt running on such a platform:
                              http://emsystech.de/wp-content/uploads/2012/09/raspi-lcd-1.jpg

                              with navigation, iputs etc? Have you already done such a project?

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 8 May 2015, 20:36 last edited by
                                #15

                                I did, years ago and Qt wasn't even in it's 4 series

                                What exact errors are you getting with Qt 5 ?

                                In any case, if you have Qt 4 running properly, then use it also on your desktop to ensure you have the same behavior on both sides

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • B Offline
                                  B Offline
                                  BluTiGeS
                                  wrote on 8 May 2015, 20:44 last edited by
                                  #16

                                  Okay thats sound good, maybe I need to give qt5 a second try or use also qt4 on the desktop.

                                  I am not a the system right now but as I have in mind starting the application with

                                  ./test -qpa linuxFB:/dev/fb0

                                  and then i got the DBUS error. Maybe my cmdline is also wrong. QT5 cross compile was not plug and play for me.

                                  Do you remember how you have realized inputs with this few buttons?

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 8 May 2015, 20:59 last edited by
                                    #17

                                    The exact error messages would be useful. Just to rule out the obvious: do you have the dbus daemon running ?

                                    The UI was written to be very keyboard friendly and had a lot thinking about focusing so as to make sense when moving from up to down and left to right. What kind of UI will that be ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply
                                    0
                                    • B Offline
                                      B Offline
                                      BluTiGeS
                                      wrote on 11 May 2015, 06:17 last edited by
                                      #18

                                      Okay, seems to be DBUS not running correctly:

                                      ./TestQTCross -platform linuxfb:fb"/dev/fb0"

                                      QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
                                      QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
                                      process 2302: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
                                      See the manual page for dbus-uuidgen to correct this issue.
                                      D-Bus not built with -rdynamic so unable to print a backtrace
                                      Aborted (core dumped)

                                      is the DBUS really needed for qt5 embedded? since it is not in 4.8?

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on 12 May 2015, 20:30 last edited by
                                        #19

                                        The DBus module is also included in the 4 series however AFAIK it should not be mandatory for the linuxfb plugin but you also have another problem with iconv_open. Are you using the same version of libraries on your target than the one used to build Qt 5 ?

                                        Interested in AI ? www.idiap.ch
                                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        0
                                        • B Offline
                                          B Offline
                                          BluTiGeS
                                          wrote on 13 May 2015, 06:35 last edited by
                                          #20

                                          Hi,
                                          yes i am using the same ones.

                                          The configure command looks as follows:

                                          ./configure -release -opensource -confirm-license -arch arm -xplatform linux-arm-gnueabi-g++ -no-icu -no-pch -prefix /usr/local/Trolltech/qt5 -skip qtwebkit-examples -skip qtwebkit

                                          I have adapted the qmake.conf of the linux-arm-gnueabi-g++ to fit my cross compile toolchain.

                                          Do you see any issue?

                                          1 Reply Last reply
                                          0

                                          4/34

                                          3 May 2015, 21:51

                                          topic:navigator.unread, 30
                                          • Login

                                          • Login or register to search.
                                          4 out of 34
                                          • First post
                                            4/34
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved