Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Help Needed
QtWS25 Last Chance

Help Needed

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 5 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    spnvelvet
    wrote on last edited by
    #1

    Dear Sir,
    I am very new to Qt framework.
    I have this code on click event of button bOK to set text of label lMsg.

    @
    void MainWindow::on_bOK_clicked()
    {
    QtMobility::QMessageManager vMM;
    int vFolderCount=vMM.countMessages();
    ui->lMsg->setText(QString::number(vFolderCount,10));
    }
    @

    What I am getting in output is 0.
    What has gone wrong.

    Edit: please use @ tags around your code; Andre

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thisisbhaskar
      wrote on last edited by
      #2

      Place your code enclosed in @, that will make it more readable..

      You can call error() on vMM to get to know the error that has occurred with previous call.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        spnvelvet
        wrote on last edited by
        #3

        How to use @ to make code readable?

        vMM.error() return object of type QMessageManager::Error type.
        How to get actual error out of it to show in label.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          thisisbhaskar
          wrote on last edited by
          #4

          I am not sure.. the best thing is to check documentation..

          @ http://doc.qt.nokia.com/qtmobility-1.2.0-beta1/qmessagemanager.html

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            [quote author="spnvelvet" date="1311665337"]How to use @ to make code readable?
            [/quote]

            "Here is a link to the forum help ":http://developer.qt.nokia.com/wiki/ForumHelp

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              spnvelvet: Please:

              Use a message title that conveys the actual problem, not that you need help solving it (almost everybody posting needs help)

              Don't flag your messages as urgent. It may be for you, but that is your problem, not ours.

              For more details on both these points (as well as other important pointers on how to get better help), see "this":http://www.catb.org/~esr/faqs/smart-questions.html FAQ.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mlong
                wrote on last edited by
                #7

                [quote author="spnvelvet" date="1311655732"]What I am getting in output is 0.
                [/quote]

                Is it possible that there are actually no messages in the message store?

                If not, calling vMM.error() as Vijay and spnvelvet recommended is probably a good idea.

                Software Engineer
                My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved