×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    118

    automatic rotate screen on meamo

    i know maemo5 had a feature the same as iPhone ,
    i just says it: "automatic rotate screen" (because i am not a english native guy, so i don't know how to say it very clearly)
    i want my apps could rotate on screen with automatic as well,
    does there have some public fuction to handle it??

  2. #2
    Registered User
    Join Date
    Sep 2009
    Posts
    24

    Re: automatic rotate screen on meamo

    Quote Originally Posted by fily_love View Post
    i know maemo5 had a feature the same as iPhone ,
    i just says it: "automatic rotate screen" (because i am not a english native guy, so i don't know how to say it very clearly)
    i want my apps could rotate on screen with automatic as well,
    does there have some public fuction to handle it??
    have a look here
    http://qt.nokia.com/doc/qt-maemo-4.6...-rotation.html

  3. #3
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: automatic rotate screen on meamo

    Please, take into account that auto orientation has negative impact on a battery life as it's actively polling accelerometer data.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    81

    Re: automatic rotate screen on meamo

    Quote Originally Posted by rkurvakat View Post
    thank you for your help, but this example need click button to set the rotate screen, i want to automatic set rotate screen without manual on the different rotate. It is gravitational.

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: automatic rotate screen on meamo

    Autorotation is enabled with one line of the code, no buttons involved
    Code:
    window->setAttribute(Qt::WA_Maemo5AutoOrientation, true);

  6. #6
    Registered User
    Join Date
    Dec 2008
    Posts
    81

    Re: automatic rotate screen on meamo

    Quote Originally Posted by divanov View Post
    Autorotation is enabled with one line of the code, no buttons involved
    Code:
    window->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
    hi, i have add this line in my code, but it doesn't work on the real devices(N900), so can you help me continue?

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: automatic rotate screen on meamo

    Quote Originally Posted by denniswang View Post
    hi, i have add this line in my code, but it doesn't work on the real devices(N900), so can you help me continue?
    It works fine on my N900 with Qt 4.6 installed
    Code:
    #include <QApplication>
    #include <QMainWindow>
    
    int
    main (int argc, char **argv)
    {
        QApplication app(argc, argv);
        QMainWindow win;
        win.setAttribute(Qt::WA_Maemo5AutoOrientation, true);
        win.show();
        return app.exec();
    }

  8. #8
    Registered User
    Join Date
    Dec 2008
    Posts
    81

    Re: automatic rotate screen on meamo

    Quote Originally Posted by divanov View Post
    It works fine on my N900 with Qt 4.6 installed
    Code:
    #include <QApplication>
    #include <QMainWindow>
    
    int
    main (int argc, char **argv)
    {
        QApplication app(argc, argv);
        QMainWindow win;
        win.setAttribute(Qt::WA_Maemo5AutoOrientation, true);
        win.show();
        return app.exec();
    }
    sorry man, it doesn't work on my N900. maybe there are some different with QT and devices version?
    my qt version is 4.6.2, i don't know my N900 version.

  9. #9
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: automatic rotate screen on meamo

    Quote Originally Posted by denniswang View Post
    my qt version is 4.6.2, i don't know my N900 version.
    Check it with
    Code:
    dpkg -l "libqt4-*"
    in XTerminal.

  10. #10
    Registered User
    Join Date
    Dec 2008
    Posts
    81

    Re: automatic rotate screen on meamo

    Quote Originally Posted by divanov View Post
    Check it with
    Code:
    dpkg -l "libqt4-*"
    in XTerminal.
    libqt4-maemo5- is 4.6.2 and libqt4-core,libqt4-dbus, libqt4-dev,libqt4-sql, libqt4-sql-sql,libqt4-xml is 4.5.3
    how about yours? my problem is here?

  11. #11
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: automatic rotate screen on meamo

    Quote Originally Posted by denniswang View Post
    libqt4-maemo5- is 4.6.2 and libqt4-core,libqt4-dbus, libqt4-dev,libqt4-sql, libqt4-sql-sql,libqt4-xml is 4.5.3
    how about yours? my problem is here?
    You must have the same library versions of Qt in scratchbox and on the device. Qt 4.5.3 and 4.6.2 are not binary compatible.

  12. #12
    Registered User
    Join Date
    Dec 2008
    Posts
    81

    Re: automatic rotate screen on meamo

    ok, i will try again, thank you very much

  13. #13
    Registered User
    Join Date
    Dec 2008
    Posts
    81

    Re: automatic rotate screen on meamo

    hi Divanov, i had implemented the feature that i want with QDBusConnection. so any way thank you for your great help.
    One more thing, ftball and fily_love is not me, they are my workmate

  14. #14
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: automatic rotate screen on meamo

    Quote Originally Posted by denniswang View Post
    hi Divanov, i had implemented the feature that i want with QDBusConnection. so any way thank you for your great help.
    You can use raw MCE dbus calls to achieve the same, but it's a strange choice since Qt provides so nice wrapper.

  15. #15
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    59

    Re: automatic rotate screen on meamo

    I have the same problem. The setAttribute(Qt::WA_Maemo5AutoOrientation, true) does not work. I can manually get the dispaly into landscape or portrait, but aoutomatic rotate does not work.

    I also tried the Maemo 5 Rotation Example. My QT libs are the same version as can be seen bellow.

    Question:
    Which of the packages implements the auto-rotate functionality?

    QT libs on my scratchbox:
    Code:
    rc  libqt4-assistant                4.5.3~git20090723-0maemo6+0m5   Qt 4 assistant module
    ii  libqt4-core                     4.6.2~git20100224-0maemo1+0m5   Qt 4 core module
    ii  libqt4-dbus                     4.6.2~git20100224-0maemo1+0m5   Qt 4 D-Bus module
    rc  libqt4-designer                 4.5.3~git20090723-0maemo6+0m5   Qt 4 designer module
    ii  libqt4-dev                      4.6.2~git20100224-0maemo1+0m5   Qt 4 development files
    ii  libqt4-gui                      4.6.2~git20100224-0maemo1+0m5   Qt 4 GUI module
    rc  libqt4-help                     4.5.3~git20090723-0maemo6+0m5   Qt 4 help module
    ii  libqt4-maemo5                   4.6.2~git20100224-0maemo1+0m5   Qt 4 Maemo5 module
    ii  libqt4-maemo5-core              4.6.2~git20100212-0maemo1       Qt 4 core module
    ii  libqt4-maemo5-dbus              4.6.2~git20100212-0maemo1       Qt 4 D-Bus module
    ii  libqt4-maemo5-dev               4.6.2~git20100212-0maemo1       Qt 4 development files
    ii  libqt4-maemo5-gui               4.6.2~git20100212-0maemo1       Qt 4 GUI module
    ii  libqt4-maemo5-maemo5            4.6.2~git20100212-0maemo1       Qt 4 Maemo5 module
    ii  libqt4-maemo5-multimedia        4.6.2~git20100212-0maemo1       Qt 4 Multimedia Libraries
    ii  libqt4-maemo5-network           4.6.2~git20100212-0maemo1       Qt 4 network module
    ii  libqt4-maemo5-opengl            4.6.2~git20100212-0maemo1       Qt 4 OpenGL module
    ii  libqt4-maemo5-opengl-dev        4.6.2~git20100212-0maemo1       Qt4 OpenGL development files
    ii  libqt4-maemo5-phonon            4.6.2~git20100212-0maemo1       Qt 4 Phonon Libraries
    ii  libqt4-maemo5-script            4.6.2~git20100212-0maemo1       Qt 4 script module
    ii  libqt4-maemo5-sql               4.6.2~git20100212-0maemo1       Qt 4 SQL module
    ii  libqt4-maemo5-sql-sqlite        4.6.2~git20100212-0maemo1       Qt 4 SQLite plugin
    ii  libqt4-maemo5-svg               4.6.2~git20100212-0maemo1       Qt 4 SVG module
    ii  libqt4-maemo5-test              4.6.2~git20100212-0maemo1       Qt 4 test module
    ii  libqt4-maemo5-webkit            4.6.2~git20100212-0maemo1       Qt 4 WebKit module
    ii  libqt4-maemo5-xml               4.6.2~git20100212-0maemo1       Qt 4 XML module
    ii  libqt4-maemo5-xmlpatterns       4.6.2~git20100212-0maemo1       Qt 4 XML Patterns module
    ii  libqt4-multimedia               4.6.2~git20100224-0maemo1+0m5   Qt 4 Multimedia Libraries
    ii  libqt4-network                  4.6.2~git20100224-0maemo1+0m5   Qt 4 network module
    ii  libqt4-opengl                   4.6.2~git20100224-0maemo1+0m5   Qt 4 OpenGL module
    pn  libqt4-opengl-dev               <none>                          (no description available)
    ii  libqt4-phonon                   4.6.2~git20100224-0maemo1+0m5   Qt 4 Phonon Libraries
    ii  libqt4-script                   4.6.2~git20100224-0maemo1+0m5   Qt 4 script module
    ii  libqt4-sql                      4.6.2~git20100224-0maemo1+0m5   Qt 4 SQL module
    ii  libqt4-sql-sqlite               4.6.2~git20100224-0maemo1+0m5   Qt 4 SQLite plugin
    ii  libqt4-svg                      4.6.2~git20100224-0maemo1+0m5   Qt 4 SVG module
    ii  libqt4-test                     4.6.2~git20100224-0maemo1+0m5   Qt 4 test module
    ii  libqt4-webkit                   4.6.2~git20100224-0maemo1+0m5   Qt 4 WebKit module
    ii  libqt4-xml                      4.6.2~git20100224-0maemo1+0m5   Qt 4 XML module
    ii  libqt4-xmlpatterns              4.6.2~git20100224-0maemo1+0m5   Qt 4 XML Patterns module
    QT libs on my N900:
    Code:
    ii  libqt4-appdownloader-comm       0.0.4                           library for communication with maemo.org downloads REST API
    ii  libqt4-core                     4.6.2~git20100224-0maemo1+0m5   Qt 4 core module
    ii  libqt4-dbus                     4.6.2~git20100224-0maemo1+0m5   Qt 4 D-Bus module
    ii  libqt4-dev                      4.6.2~git20100224-0maemo1+0m5   Qt 4 development files
    ii  libqt4-gui                      4.6.2~git20100224-0maemo1+0m5   Qt 4 GUI module
    ii  libqt4-maemo5                   4.6.2~git20100224-0maemo1+0m5   Qt 4 Maemo5 module
    ii  libqt4-maemo5-core              4.6.2~git20100212-0maemo1       Qt 4 core module
    ii  libqt4-maemo5-dbus              4.6.2~git20100212-0maemo1       Qt 4 D-Bus module
    ii  libqt4-maemo5-gui               4.6.2~git20100212-0maemo1       Qt 4 GUI module
    ii  libqt4-maemo5-maemo5            4.6.2~git20100212-0maemo1       Qt 4 Maemo5 module
    ii  libqt4-maemo5-network           4.6.2~git20100212-0maemo1       Qt 4 network module
    ii  libqt4-maemo5-opengl            4.6.2~git20100212-0maemo1       Qt 4 OpenGL module
    ii  libqt4-maemo5-phonon            4.6.2~git20100212-0maemo1       Qt 4 Phonon Libraries
    ii  libqt4-maemo5-svg               4.6.2~git20100212-0maemo1       Qt 4 SVG module
    ii  libqt4-maemo5-webkit            4.6.2~git20100212-0maemo1       Qt 4 WebKit module
    ii  libqt4-maemo5-xml               4.6.2~git20100212-0maemo1       Qt 4 XML module
    ii  libqt4-maemo5-xmlpatterns       4.6.2~git20100212-0maemo1       Qt 4 XML Patterns module
    ii  libqt4-multimedia               4.6.2~git20100224-0maemo1+0m5   Qt 4 Multimedia Libraries
    ii  libqt4-network                  4.6.2~git20100224-0maemo1+0m5   Qt 4 network module
    ii  libqt4-opengl                   4.6.2~git20100224-0maemo1+0m5   Qt 4 OpenGL module
    un  libqt4-opengl-dev               <none>                          (no description available)
    ii  libqt4-phonon                   4.6.2~git20100224-0maemo1+0m5   Qt 4 Phonon Libraries
    ii  libqt4-script                   4.6.2~git20100224-0maemo1+0m5   Qt 4 script module
    ii  libqt4-sql                      4.6.2~git20100224-0maemo1+0m5   Qt 4 SQL module
    ii  libqt4-sql-sqlite               4.6.2~git20100224-0maemo1+0m5   Qt 4 SQLite plugin
    ii  libqt4-svg                      4.6.2~git20100224-0maemo1+0m5   Qt 4 SVG module
    ii  libqt4-test                     4.6.2~git20100224-0maemo1+0m5   Qt 4 test module
    ii  libqt4-webkit                   4.6.2~git20100224-0maemo1+0m5   Qt 4 WebKit module
    ii  libqt4-xml                      4.6.2~git20100224-0maemo1+0m5   Qt 4 XML module
    ii  libqt4-xmlpatterns              4.6.2~git20100224-0maemo1+0m5   Qt 4 XML Patterns module
    Thanks,
    Klen

Page 1 of 2 12 LastLast

Similar Threads

  1. Black screen when playing Video on Nokia 6680
    By cbazza@poliplus.com in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-01-26, 17:24
  2. Full screen splash screen
    By jitendrachhajed in forum Symbian C++
    Replies: 1
    Last Post: 2005-07-11, 08:01
  3. Why use direct screen access?
    By Kalderas in forum Symbian C++
    Replies: 3
    Last Post: 2003-10-10, 14:29
  4. how to change Screen from Form to FullCanvas
    By ihadreampp in forum Mobile Java General
    Replies: 3
    Last Post: 2003-08-15, 08:50
  5. Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •