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. Compilation errors with example UI application on S60 platform
Qt 6.11 is out! See what's new in the release blog

Compilation errors with example UI application on S60 platform

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 4 Posters 5.0k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    anobika
    wrote on last edited by
    #1

    I have already an example QT application which I have modified.
    I have used a label object from the QT C++ Widget Box for which I want to set the text in my program.

    My code snippet:
    backLightStatusLabel->setText((di->backLightOn() ? "On" : "Off"));

    However, the compiler does not recognize the object(backLightStatusLabel - which I have already added on the application UI) and returns error.

    Is there something else that I need to do?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anselmolsm
      wrote on last edited by
      #2

      Hi anobika, what's the compiler error?

      Is backLightStatusLabel in a .ui file?

      Tip: use @ around your code snippets to format it properly
      Tip2: Qt, not QT :-)

      Anselmo L. S. Melo (anselmolsm)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anobika
        wrote on last edited by
        #3

        Hi Anselmo,

        the compilation error is: backLightStatusLabel is not defined.
        The label is in a .ui file.

        1. I have updated the .pro file which previously had a different .ui file assigned to FORM parameter.
        2. Did a qmake
        3. built the code using the command make release-armv5

        I don't see a new u_*.h file getting created.

        Is there a separate command to build changes in the .ui file?

        Thanks for the tips :)

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Fuzzbender
          wrote on last edited by
          #4

          Try calling 'make clean' and then 'qmake, followed by 'make ...' (whichever platform you are building for).

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anobika
            wrote on last edited by
            #5

            Have tried it but that has not helped.
            Is there a need to use the uic Tool in this case?
            I am working on the S60 platform as mentioned. Please let me know the steps to compile the changes made in the .ui file.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kamalakshantv
              wrote on last edited by
              #6

              [quote author="anobika" date="1289813694"]Have tried it but that has not helped.
              Is there a need to use the uic Tool in this case?
              I am working on the S60 platform as mentioned. Please let me know the steps to compile the changes made in the .ui file.[/quote]

              Have you tried something like

              ui.setupUi(this);
              ui.backLightStatusLabel->setText((di->backLightOn() ? “On” : “Off”));

              1 Reply Last reply
              0
              • A Offline
                A Offline
                anselmolsm
                wrote on last edited by
                #7

                Hi there, sorry about the late answer, I did not have the expected Internet access while traveling. Well, QtK pointed well, you need to access the content of the class generated based on you .ui file - often a ui pointer declared in the header file of the class you're implementing (QtCreator does it automatically for you, I don't know if it is your case)

                Anselmo L. S. Melo (anselmolsm)

                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