×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Question Can Symbian C++ and Qt S60 Code be used together..

    Can Symbian C++ and Qt S60 Code be used together.. as i was able to compile but how the convert TBuf to QString which is recognized by Qt framework..

    //
    QApplication a(argc, argv);
    _LIT(KMsg,"Hello");
    TBuf<10> buf(KMsg);
    HelloQtS60 w;
    w.show();
    return a.exec();
    //
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Posts
    468

    Re: Can Symbian C++ and Qt S60 Code be used together..

    Yes,
    Qt is compiled by the native compiler in the same manner as is Symbian C++ so you can mix Qt with Symbian.

    It's a good rule to #ifdef the Symbian parts so that you can compile the Qt part in other platforms as well.

    Cheers,
    Jack

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Can Symbian C++ and Qt S60 Code be used together..

    Hi,

    Look at the constructors available for a QString in the Qt documentation and the Ptr() and Length() methods for TBuf. You'll be able to work it out.

    Sorcery

  4. #4
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Re: Can Symbian C++ and Qt S60 Code be used together..

    hi

    _LIT(KMsg,"Hello");
    TBuf<10> buf(KMsg);
    QChar qChar(*buf.Ptr()); //IMPORT_C const TUint16 *Ptr() const
    QString qString(&qChar,buf.Size()); //QString ( const QChar * unicode, int size )


    qString only shows the "H" rest are junk..
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Can Symbian C++ and Qt S60 Code be used together..

    It's done exactly what you've asked. Don't create a single QChar first - that's just the one character.

    You could try using the same constructor and just casting buf.Ptr() to QChar*.

    Mark

  6. #6
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Smile Re: Can Symbian C++ and Qt S60 Code be used together..

    thanks Mark
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  7. #7
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Re: Can Symbian C++ and Qt S60 Code be used together..

    Quote Originally Posted by kamaljaiswal View Post
    thanks Mark
    Hi Kamal,

    Where can i will find Symbian S60 QT Trianing in INDIA.Please let me know

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Can Symbian C++ and Qt S60 Code be used together..

    Quote Originally Posted by symbianbaha View Post
    Hi Kamal,

    Where can i will find Symbian S60 QT Trianing in INDIA.Please let me know
    We are not aware of any training on Qt S60 in india. Needless to say i am from india.

Posting Permissions

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