Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Regarding accessing command line arguments

    General and Desktop
    2
    2
    1429
    Loading More Posts
    • 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.
    • I
      Indrajeet last edited by

      Hi All

      I have created an QtApplication project.On Window i have one QLabel.
      Now i am running my application from command prompt with command line arguments.
      I am able to recieve those arguments,But i want to set those arguments to my label on window.
      so how can i access my Label variable in main();

      1 Reply Last reply Reply Quote 0
      • Zlatomir
        Zlatomir last edited by

        Create a public function (member of the "widget" class that contains the ui) that takes a QString and set it as the QLabel text and call the widget's member function from main.

        https://forum.qt.io/category/41/romanian

        1 Reply Last reply Reply Quote 0
        • First post
          Last post