Meego Wiki
Views

SDK/Tablet/MeeGo SDK 1.2 Preview Configure Qt

From MeeGo wiki
Jump to: navigation, search

Contents

Install Part 2: Configure Qt Creator

Once the MeeGo SDK has been installed, you can configure Qt Creator to use the MeeGo toolchain.

Configure Qt Creator to use the MeeGo toolchain

  1. Start Qt Creator: Start > All Programs > MeeGo SDK > Qt Creator
  2. Configure Qt Creator to use MeeGo toolchain:
    1. Go to Tools > Options > Qt4 > Qt Versions. You will see a "meego-tablet" Qt version under "Manual"
    2. On the Version Name line, you can enter a user-friendly name for the tablet Qt version.
    3. On the qmake location line, specify a qmake location for the new version. The toolchain installs by default to C:\MeeGoSDK_1.2\MADDE\targets\<target name>\bin\qmake. Once you have picked qmake.exe the "Rebuild" button should be enabled.
    4. Click Rebuild. If successful, you will see a green checkmark next to the "Debugging helpers" text. Click OK.
    5. Qt-config-options.jpg

Create a MeeGo application

  1. Go to the menu: File > New File or Project > Qt Gui Application
    Qt-config-new-gui-app.jpg
  2. At the end of project creation, you will see the "Project setup" dialog. Choose the MeeGo toolchain you configured.
    Qt-config-project-setup.jpg

Build configuration of MeeGo project

  1. Click the "Projects" icon on the left of Qt Creator. The "MeeGo" build and run configuration page will be shown.
  2. Verify that the MeeGo toolchain is selected as the "Qt Version" when building. Qt-config-projects.jpg

Configure device access in Qt Creator

Configuring device access in Qt Creator is slightly different depending on whether you are deploying to a real device or an emulated one. However, the mode of access is the same: Qt Creator deploys and installs an .rpm package on the device, and runs the executable.

For instructions on configuring device access, see:

   Configure Qt Creator for MeeGo emulator
   Configure Qt Creator for MeeGo device

5. Set Run Configuration

   Click "Projects" again on the left side. Select "Run" in the MeeGo Build/Run box at the top. If the "Device configuration" is set to "MeeGo tablet emulator". This will ensure that QEMU is started when you run your application.
   You can now launch the QEMU MeeGo emulator. Click the "Start Meego emulator" icon near the bottom left corner of Qt Creator
   Qt Creator - choose runtime option
   if the "Device configuration" is set to "real device". This will ensure the application run in the tablet device.

6. Build, run and deploy the application

   Click the "Run" icon to run your application. Qt Creator will package and deploy your application to QEMU or tablet device and start it on the target.
   You can see the window of your application in QEMU or tablet device.
   MeeGo emulator - MTF sample

7. Debug the application

   You can debug the application by clicking the "Debug" icon.
   You can also set breakpoints and step the same as local applications.
   Qt Creator - debug application
   For more information on debugging, see Debugging with Qt Creator

Known Issues

   The meegotouch development library has a bug which makes it conflict with the host Qt library. If you have installed another Qt library, you have to move the Qt libraries in /usr/lib to other place:
   # sudo mkdir /usr/lib/qtbak
   # sudo mv /usr/lib/libQt* /usr/lib/qtbak
   Qt application can be built & deployed to the emulator, but it cannot be shown correctly. Only a black screen.
   For QEMU, it is important to check your graphics capability. See SDK Graphics Acceleration
Personal tools