×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    How to use Qt Creator for creating maemo applications

    I am working in a new project for Maemo and I would like to create my Qt application using desktop version of Qt Creator and only recompile this application inside scratchbox. However, when I tried to do this, I discovered that I had different versions: Latest Qt SDK (PC) is based on Qt 4.6 and moc compiler inside scratchbox can not compile my .ui file (it is based on Qt 4.5).

    I would like to hear some suggestions from you. What is the best alternative ? Is there any other alternative ?

    a) Install SDK 4.5 and configure Qt Creator for it (for desktop)
    b) Update Qt SDK inside scratchbox to 4.6 (is it possible?)
    c) Recompile Qt Creator for scratchbox (no, thanks)
    d) Configure Qt Creator to use scratchbox SDK (is it possible?)
    e) Create my UI by hand, not using Qt Creator
    f) Other option, much better and far from my weird ideas

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

    Re: How to use Qt Creator for creating maemo applications

    This topic addresses the same issue:
    http://discussion.forum.nokia.com/fo...d.php?p=693340

  3. #3
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to use Qt Creator for creating maemo applications

    Thanks Daniil. I'd searched only for "Qt Creator scratchbox" in Forums.

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

    Re: How to use Qt Creator for creating maemo applications

    Quote Originally Posted by marcelobarrosalmeida View Post
    Thanks Daniil. I'd searched only for "Qt Creator scratchbox" in Forums.
    Antonio also wrote about using Qt Creator for Maemo development:
    https://garage.maemo.org/pipermail/q...il/000385.html
    (note, maemo.org is on maintenance today, so the link doesn't open, use Google cache to check it or wait until end of the maintenance).

    Apart from that, most of the Linux distribution has Qt 4.5.x as Qt 4.6 is still unstable, so you can install your distribution Qt packages to implement plan a).

  5. #5
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to use Qt Creator for creating maemo applications

    Quote Originally Posted by divanov View Post
    Antonio also wrote about using Qt Creator for Maemo development:
    https://garage.maemo.org/pipermail/q...il/000385.html
    (note, maemo.org is on maintenance today, so the link doesn't open, use Google cache to check it or wait until end of the maintenance).

    Apart from that, most of the Linux distribution has Qt 4.5.x as Qt 4.6 is still unstable, so you can install your distribution Qt packages to implement plan a).
    Thanks again, Daniil. In fact, it was this email from Antonio that inspired me to write this thread
    I will test alternatives a and b, at least. They seem easier and less time consuming.

  6. #6
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to use Qt Creator for creating maemo applications

    I followed all instructions for Fremantle and my app is running in the emulator (X86 target) and compiling for ARMEL target. I tried to copy it to N900 and run it but I have a segmentation fault. Before exploring the problem, I tried to install the same libs I am using at PC:

    Code:
    Nokia-N900-44-1:~# apt-get update
    Nokia-N900-44-1:~# apt-get remove libqt4*
    Nokia-N900-44-1:~# apt-get install libqt4-maemo5-dev
    But it generates some dependency errors:

    Code:
    The following packages have unmet dependencies:
      libqt4-maemo5-dev: Depends: libgles2-sgx-img-dev but it is not installable
                         Depends: opengles-sgx-img-common-dev but it is not installable
                         Depends: libsqlite3-dev but it is not installable
    However, these packages are not available:

    Code:
    Nokia-N900-44-1:~# apt-cache search libgles2-sgx-img
    libgles2-sgx-img - OpenGL ES 2.0 SGX library
    opengles-sgx-img-common - PowerVR SGX support libraries
    
    Nokia-N900-44-1:~# apt-cache search libsqlite3       
    libsqlite3-0 - SQLite 3 shared library
    For N900, do we really need dev packages instead only libs ? Tips for solving this problem ?

    PS: My source list:

    Code:
    Nokia-N900-44-1:~# cat /etc/apt/sources.list.d/hildon-application-manager.list  
    deb https://downloads.maemo.nokia.com/fremantle/ssu/apps/ ./ 
    deb https://downloads.maemo.nokia.com/fremantle/ssu/mr0 ./ 
    deb https://downloads.maemo.nokia.com/fremantle/ovi/ ./ 
    deb http://repository.maemo.org/extras/ fremantle free non-free
    deb-src http://repository.maemo.org/extras/ fremantle free non-free
    deb http://repository.maemo.org/extras-devel/ fremantle free non-free
    deb-src http://repository.maemo.org/extras-devel/ fremantle free non-free
    deb http://repository.maemo.org/extras-testing/ fremantle free non-free
    deb-src http://repository.maemo.org/extras-testing/ fremantle free non-free

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

    Re: How to use Qt Creator for creating maemo applications

    Development packages contain headers files needed for compilation. Thus if you do not compile anything on your N900 it makes no sense to install them there. However, it's still possible, those packages are in nokia-binaries repository, which is not in your source.list.

  8. #8
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to use Qt Creator for creating maemo applications

    Quote Originally Posted by divanov View Post
    Development packages contain headers files needed for compilation. Thus if you do not compile anything on your N900 it makes no sense to install them there. However, it's still possible, those packages are in nokia-binaries repository, which is not in your source.list.
    Thanks ! I will add it and download libs. I will check how to download without the cited dependencies since they are not useful (maybe using dpkg --force-conflicts).

    I would like to ask just one more question regarding Qt Creator and maemo (I hope).
    I designed my application menus at Qt Creator like:

    Code:
    Edit
      -> Copy
      -> Paste
    So, in the menu bar I have a menu (Edit) and two actions (Copy and Paste). In maemo, this was translated to two actions (as expected) only but with labels "Edit / Copy" and "Edit / Paste" (a composition with menu name and action name).

    Thus I went to Qt Creator and set menu bar name to "" (empty string) (in fact, title property). This way it was possible to see menus at mamemo as expected: "Edit" and "Paste".

    The question is: is this right ? Am I doing it properly ? Should I use empty names for menu bar titles ?

    Worst: emtpy menu bar names generates application in Desktop without menu at all and it is necessary to add a name if you want to edit this menu using menu editor in Qt Creator.

    I know that some people are blaming me now, saying that is simple to create this menus programatically. Yes, I agree, I blamed myself. But I believe as well that we need to have a good UI for those people that have a different thinking and want to do everything in the IDE.

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

    Re: How to use Qt Creator for creating maemo applications

    Quote Originally Posted by marcelobarrosalmeida View Post
    Thanks ! I will add it and download libs. I will check how to download without the cited dependencies since they are not useful (maybe using dpkg --force-conflicts).
    There are no conflicts and no need to add repository to the device's source.list. Just avoid trying to install development packages.

    Quote Originally Posted by marcelobarrosalmeida View Post
    I would like to ask just one more question regarding Qt Creator and maemo (I hope).
    I designed my application menus at Qt Creator like:

    Code:
    Edit
      -> Copy
      -> Paste
    So, in the menu bar I have a menu (Edit) and two actions (Copy and Paste). In maemo, this was translated to two actions (as expected) only but with labels "Edit / Copy" and "Edit / Paste" (a composition with menu name and action name).

    Thus I went to Qt Creator and set menu bar name to "" (empty string) (in fact, title property). This way it was possible to see menus at mamemo as expected: "Edit" and "Paste".

    The question is: is this right ? Am I doing it properly ? Should I use empty names for menu bar titles ?
    There is an example, which works fine on desktop and with Qt 4.6 on Maemo: http://discussion.forum.nokia.com/fo...d.php?t=188933

  10. #10
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to use Qt Creator for creating maemo applications

    Thanks again. Just to give feedback:

    It is possible to install Qt Creator 1.3.1 inside scratchbox and run it inside an X11 window (via xephyr, see picture 1).

    I could set QtCreator to use qt4-maemo5 SDK (picture 2) and I ran my application from it (picture 3). If Maemo is running inside xephyr (af-sb-init.sh start), the application launched by Qt Creator is handled as any normal Maemo application, with proper look and feel (launch Qt creator using run-standalone, picture 4).

    However, it is necessary to use a larger X11 windows since original N900 screen is too small to Qt Creator. I have a fast machine so the performance was not an issue. gdb did not work from Qt Creator.

    Wow, Qt rocks !

Similar Threads

  1. Some basic questions for QT with Maemo
    By smehta_ce in forum Nokia N9
    Replies: 5
    Last Post: 2009-12-18, 12:21
  2. Job Posting: Graphical Applications Developer, Cambridge, MA
    By kevin_e_schmidt in forum News, Announcements and Job Listings
    Replies: 0
    Last Post: 2009-11-06, 16:24

Posting Permissions

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