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 app in N800

Qt app in N800

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 2.3k 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.
  • P Offline
    P Offline
    paavo
    wrote on last edited by
    #1

    Hi,

    I made a simple app to display weather station web page (see "here":http://developer.qt.nokia.com/forums/viewthread/3483/), simple and easy. I installed OS2008 SDK and I can run the application in N800 (5.2008.43-7), but I have one problem: I cannot get the application to go full screen!

    If I run the application from command line, the terminal shows these error/warning messages:

    @Invalid Hildon Command: 7
    Invalid Hildon Command: 6@

    The first pair of those appears right after the app has been started and opens the web page (after URL query), then new pair of messages for each Full Screen button press.

    First I just copied the binary from development PC to the N800 and run it from the command line. I thought this quick-and-dirty method is wrong, and made a proper debian package following qt-maemo-example advice (pretty straightforward job).

    But installng the app and running it from the menu did not help, it still does not go full screen...

    Mu must be missing something obvious? How can I get the my application go full screen?

    -Paavo

    Yes I know N8x0 is a bit outdated... But it runs Qt (4.5.3) which is enough for many purposes.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      paavo
      wrote on last edited by
      #2

      Hi,

      if I replace @view.show();@ with @view.showFullScreen();@ the application is shown full-screen which is fine, but I still cannot change between non-full-screen and full-screen...

      -Paavo

      1 Reply Last reply
      0
      • P Offline
        P Offline
        paavo
        wrote on last edited by
        #3

        Talking to myself...

        I propably need something like this: @void fullScreenKeyPressed()
        {
        if(!isFullScreen)
        {
        view.showFullScreen();
        isFullScreen=TRUE;
        }
        else
        {
        view.showNormal();
        isFullScreen=FALSE;
        }
        }@ Is there a signal I can connect this slot to?

        Or do I need to use keyPressEvent() handler?

        If so, how can I do that, when my very simple app is just the main() function now?

        What is the N800 Full Screen key? The closes I could find is Qt::Key_SplitScreen (0x010000ed),
        I could not find Key_FullScreen from "this":http://doc.qt.nokia.com/4.7/qt.html#Key-enum

        -Paavo

        1 Reply Last reply
        0
        • P Offline
          P Offline
          paavo
          wrote on last edited by
          #4

          Continuing the monologue...

          Instead of @QWebView view;@ I have @MyBrowser browser;@ and these: mybrowser.h @#ifndef MYBROWSER_H
          #define MYBROWSER_H

          #include <QtGui>
          #include <QWebView>

          #define N800_FULL_SCREEN_KEY 0x01000035

          class MyBrowser : public QWebView
          {
          Q_OBJECT

          public:
          MyBrowser(QWidget *parent = 0);
          // ~MyBrowser();

          protected:
          void keyPressEvent(QKeyEvent *event);

          private:
          bool isFullScreen;
          };

          #endif // MYBROWSER_H@ and mybrowser.cpp @#include "mybrowser.h"

          MyBrowser::MyBrowser(QWidget parent) : QWebView(parent)
          {
          isFullScreen = FALSE; /
          initialise */
          }

          // MyBrowser::~MyBrowser() {}

          void MyBrowser::keyPressEvent(QKeyEvent *event)
          {
          // qDebug(QString("Key 0x%1").arg(event->key(), 8, 16, QChar('0')).toAscii().data());

          switch (event->key())
          {
              case Qt::Key_Escape:
          
                  back(); /* go to the previous page */
                  break;
            
              case N800_FULL_SCREEN_KEY:
          
                  if(isFullScreen)
                  {
                      showNormal();
                      isFullScreen = FALSE;
                  }
                  else
                  {
                      showFullScreen();
                      isFullScreen = TRUE;
                  }
          
                  break;
          
              default: /* let base class handle the rest */
          
           QWebView::keyPressEvent(event);
          }
          

          }@ and it works the way I want. N800 full-screen key is the same as F6 in normal PC keyboard. Since N800 does not have backspace hard-key, I use escape to go back to the previous page.

          -Paavo

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fcrochik
            wrote on last edited by
            #5

            You may want to check out the "macuco":http://maemo.org/packages/view/macuco/'s source code .
            There is a package for the n800 on extras.

            Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

            1 Reply Last reply
            0

            • Login

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