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. Display text name file when push button is clicked
Forum Update on Monday, May 27th 2025

Display text name file when push button is clicked

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 603 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.
  • L Offline
    L Offline
    lolilol78
    wrote on 12 Jul 2018, 14:18 last edited by
    #1

    Hello everybody,

    Just a simple question as a noob,
    When I click on the button LOAD that I created, I want a text file to be loaded, and next to the button load I would like a small window saying "namefile loaded" with the name of the file loaded. Can anyone help me with this ? Which widget should I use?

    Thank you

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 12 Jul 2018, 14:53 last edited by
      #2

      Hi
      Well what part you need help with ?
      You can use a QLabel to display the loaded file.

      L 1 Reply Last reply 12 Jul 2018, 18:40
      4
      • M mrjj
        12 Jul 2018, 14:53

        Hi
        Well what part you need help with ?
        You can use a QLabel to display the loaded file.

        L Offline
        L Offline
        lolilol78
        wrote on 12 Jul 2018, 18:40 last edited by
        #3

        @mrjj Ok thanks I will try that.

        I just need to display the text file name, not what is inside, QLabel works too ?

        M 1 Reply Last reply 12 Jul 2018, 18:58
        0
        • L lolilol78
          12 Jul 2018, 18:40

          @mrjj Ok thanks I will try that.

          I just need to display the text file name, not what is inside, QLabel works too ?

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 12 Jul 2018, 18:58 last edited by
          #4

          @lolilol78
          Yes, QLabel was meant for the filename you put in code.

          1 Reply Last reply
          3
          • L Offline
            L Offline
            lolilol78
            wrote on 13 Jul 2018, 14:03 last edited by
            #5

            Thank you mrjj !

            1 Reply Last reply
            0

            1/5

            12 Jul 2018, 14:18

            • Login

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