×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    kinetic scrolling

    hi, i have a question on how kinetic scrolling is implemented. i read the docs at http://wiki.maemo.org/Qt#Maemo_Style where it says that its enabled by setting:
    Code:
    QTableWidget *table = new QTableWidget(this);
    table->setProperty("FingerScrolling", true);
    in the project im working on (womp), i use a QTableView instead of QTableWidget, so i set in on that object instead (which i thought was ok since QTableWidget is a subclass of QTableView).
    link to some of the classes that i enabled "FingerScrolling", but it doesnt work:
    https://garage.maemo.org/plugins/scm...mp&view=markup
    https://garage.maemo.org/plugins/scm...mp&view=markup

    can anyone see what im doing wrong/not doing correctly to enable fingerscrolling? - i use the latest qt4lib debs from extras-devel.

    another thing im wondering about is how i enable a view menu similar to what is found on "native" maemo apps. when i use menubar() in qt i dont get a "correct" view menu.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: kinetic scrolling

    Quote Originally Posted by stalep View Post
    hi, i have a question on how kinetic scrolling is implemented. i read the docs at http://wiki.maemo.org/Qt#Maemo_Style where it says that its enabled by setting:
    Code:
    QTableWidget *table = new QTableWidget(this);
    table->setProperty("FingerScrolling", true);
    The name of the preperty is FingerScrollable if you are using Qt 4.5.3. In Qt 4.6 it will be different, AFAIK, need to check.

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: kinetic scrolling

    Typo in wiki was fixed. Thanks for finding it.

  4. #4
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: kinetic scrolling

    np, thanks a lot for responding so quickly!

    - i still dont know how i can enable a "maemo" like view menu with qt. i couldnt find any code examples for it. atm ive just gone for using menuBar(), but i would really like to get the "maemo" view menu look.

  5. #5
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: kinetic scrolling

    Quote Originally Posted by stalep View Post
    np, thanks a lot for responding so quickly!

    - i still dont know how i can enable a "maemo" like view menu with qt. i couldnt find any code examples for it. atm ive just gone for using menuBar(), but i would really like to get the "maemo" view menu look.
    Sorry, didn't notice second question at once. Maemo look and feel was added to menus in Qt 4.5.3 maemo6 version. So you don't need to do anything in your application. Just wait for the release or compile and install Qt 4.5.3 maemo6 yourself (it will take several hours).
    Source is available here.
    Last edited by divanov; 2009-12-04 at 22:16.

  6. #6
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: kinetic scrolling

    thanks for the informative reply.

    i added the correct property to the scrollareas im using (qtableview/qlistview), and i still dont have kinetic scrolling and the scrollbars are "bigger" than "normal" (on the n900). is it something else i need to do? (should i disable the scrollbars?)

    another thing i wonder about is the default background/foreground color in qlistview/qtableview. with qt they black on white, but in maemo (n900), its white font on black background. - the selectioncolor is identical though. is this something thats not supported i 4.5, but will be supported in 4.6?

    thanks again for the informative answers, really appreciate it!

  7. #7
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: kinetic scrolling

    This is modified cached table standard qt example with finger scroll enabled:
    cachedtable1.0.0.tar.gz

    Screenshot:

    Selection colours are actually coming from Fremantle default themes, but if you don't like them for some reason, you can make custom themes for your application.

  8. #8
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: kinetic scrolling

    sorry, to continue bothering you, but my view is different than yours in the example you provided. here is my screenshot of the app:



    i tried to remove the qt4lib packages and only keep the qt4lib-*-maemo packages, but then i also lost qmake, and i cant compile anything. im listing the installed packages in the end of this post.

    if its interesting my .pro file is found here:
    https://garage.maemo.org/plugins/scm...mp&view=markup

    these are the packages ive installed in scratchbox:
    Code:
    [sbox-FREMANTLE_X86: ~] > dpkg -l libqt4*
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    ii  libqt4-assista 4.5.3~git20090 Qt 4 assistant module
    ii  libqt4-core    4.5.3~git20090 Qt 4 core module
    ii  libqt4-dbus    4.5.3~git20090 Qt 4 D-Bus module
    ii  libqt4-designe 4.5.3~git20090 Qt 4 designer module
    ii  libqt4-dev     4.5.3~git20090 Qt 4 development files
    ii  libqt4-gui     4.5.3~git20090 Qt 4 GUI module
    ii  libqt4-help    4.5.3~git20090 Qt 4 help module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 core module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 D-Bus module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 development files
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 GUI module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 Maemo5 module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 Multimedia Libraries
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 network module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 OpenGL module
    un  libqt4-maemo5- <none>         (no description available)
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 Phonon Libraries
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 script module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 SQL module
    un  libqt4-maemo5- <none>         (no description available)
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 SVG module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 test module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 WebKit module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 XML module
    ii  libqt4-maemo5- 4.6.0~git20091 Qt 4 XML Patterns module
    ii  libqt4-network 4.5.3~git20090 Qt 4 network module
    ii  libqt4-opengl  4.5.3~git20090 Qt 4 OpenGL module
    pn  libqt4-opengl- <none>         (no description available)
    ii  libqt4-phonon  4.5.3~git20090 Qt 4 Phonon Libraries
    ii  libqt4-script  4.5.3~git20090 Qt 4 script module
    ii  libqt4-sql     4.5.3~git20090 Qt 4 SQL module
    ii  libqt4-sql-sql 4.5.3~git20090 Qt 4 SQLite plugin
    ii  libqt4-svg     4.5.3~git20090 Qt 4 SVG module
    ii  libqt4-test    4.5.3~git20090 Qt 4 test module
    ii  libqt4-webkit  4.5.3~git20090 Qt 4 WebKit module
    ii  libqt4-xml     4.5.3~git20090 Qt 4 XML module
    rc  libqt4-xmlpatt 4.5.3~git20090 Qt 4 XML Patterns module

  9. #9
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: kinetic scrolling

    Quote Originally Posted by stalep View Post
    i tried to remove the qt4lib packages and only keep the qt4lib-*-maemo packages, but then i also lost qmake, and i cant compile anything. im listing the installed packages in the end of this post.
    I don't see qt4lib-*-maemo in your dpkg output, but any way libqt4-maemo5-* are Qt 4.6 packages and libqt4-* are Qt 4.5.3 packages.
    4.6 has packaging issues you would need to create symbolic link to qmake in /usr/bin as 4.6 is installed in /opt and doesn't create that
    link for some reason.

    Quote Originally Posted by stalep View Post
    these are the packages ive installed in scratchbox:
    Run it like that in order to get versions visible:
    Code:
    COLUMNS=150 dpkg -l "libqt*"
    Basically you have both 4.6 and 4.5.3 installed simultaneously. I guess there is no conflict, but make sure you have the same version of Qt installed on the device as you used for compiling the binary in scratchbox. Otherwise you will have all kind of fancy bugs.

    Just for the record: I made my screenshot on the device using Qt 4.5.3~git20090723-0maemo6.

  10. #10
    Registered User
    Join Date
    Nov 2009
    Posts
    10

    Re: kinetic scrolling

    Quote Originally Posted by divanov View Post
    I don't see qt4lib-*-maemo in your dpkg output, but any way libqt4-maemo5-* are Qt 4.6 packages and libqt4-* are Qt 4.5.3 packages.
    4.6 has packaging issues you would need to create symbolic link to qmake in /usr/bin as 4.6 is installed in /opt and doesn't create that
    link for some reason.
    ah, this was exactly the info i was looking for. i just removed libqt4 (4.5), and added /opt/qt4-maemo5/bin to $PATH and now it works as expected. thanks a lot! :)

  11. #11
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: kinetic scrolling

    Quote Originally Posted by stalep View Post
    ah, this was exactly the info i was looking for. i just removed libqt4 (4.5), and added /opt/qt4-maemo5/bin to $PATH and now it works as expected. thanks a lot!
    That makes you using Qt 4.6. Note that Qt 4.6 is not stable and my modified example doesn't work with 4.6.

Similar Threads

  1. N97 kinetic scrolling and CustomItem's pointerDragged
    By shockreaction in forum Mobile Java General
    Replies: 4
    Last Post: 2010-03-06, 21:22
  2. How to implement kinetic scrolling?
    By svdwal in forum Symbian User Interface
    Replies: 8
    Last Post: 2010-01-28, 14:36
  3. /I_Want_To/Receive_Testing_Signing_and_Technical_Support/
    By aaumala in forum Automatic Feedback Channel
    Replies: 345
    Last Post: 2009-11-30, 17:59
  4. When will 5800XM get kinetic scrolling?
    By stolidImran in forum General Development Questions
    Replies: 1
    Last Post: 2009-09-04, 07:48
  5. How to make kinetic scrolling effect on listbox?
    By Mozart2007 in forum Symbian
    Replies: 1
    Last Post: 2009-07-16, 05:08

Posting Permissions

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