Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Application change following the windows session username?
Forum Update on Monday, May 27th 2025

Application change following the windows session username?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 548 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.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello, my application have to be used by multi users but I need to allow the application functionality following the windows session username, do you know how can I get this user name?

    Thank you for your help

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      As far as i know, there is no cross platform way to do it but various ways with tradeoffs.
      https://stackoverflow.com/questions/26552517/get-system-username-in-qt
      Maybe the getenv is the less fuss way.

      F 1 Reply Last reply
      4
      • mrjjM mrjj

        Hi
        As far as i know, there is no cross platform way to do it but various ways with tradeoffs.
        https://stackoverflow.com/questions/26552517/get-system-username-in-qt
        Maybe the getenv is the less fuss way.

        F Offline
        F Offline
        filipdns
        wrote on last edited by
        #3

        @mrjj great thank you!

        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