Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Specifying variable name in Qt designer
QtWS25 Last Chance

Specifying variable name in Qt designer

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 1.3k 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.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by
    #1

    Hello all!
    I have a question with Qt designer. (Please let me know if its not a right place, so that i can move it to right section).

    I will be designing the UI using Qt designer.
    Prior to that, I have a ".h" file, which has all the variables, and their values. For example: QString label1 = "Test";

    While designing the UI using Qt designer, I would like to make use of the variable, Instead of specifying the value "manually".

    Is there any way, to let the designer to pick the name of Label from code, or from a resource file?

    Please let me know if my question is not clear.

    Thanks for your help in advance!

    Regards,
    Kumar

    --Kumar

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

      To import something into designer is not possible AFAIK. It would require to be in designer format.
      You may want to make your gui design with designer and set the different default values afterwards with your code.
      You can do this in the constructor after setupUi for instance.

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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kumararajas
        wrote on last edited by
        #3

        Thank you for the response koahnig!

        Regards,
        Kumar

        --Kumar

        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