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. How can I make qt detect a file extension in c ++
Forum Updated to NodeBB v4.3 + New Features

How can I make qt detect a file extension in c ++

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 675 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.
  • N Offline
    N Offline
    Nathan Miguel
    wrote on 7 Dec 2018, 12:23 last edited by
    #1

    I'm doing a denoiser, I'm using the file dialog to open a file, but how can I do it to detect the name of the extension that was opened

    R 1 Reply Last reply 7 Dec 2018, 12:27
    0
    • N Nathan Miguel
      7 Dec 2018, 12:23

      I'm doing a denoiser, I'm using the file dialog to open a file, but how can I do it to detect the name of the extension that was opened

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 7 Dec 2018, 12:27 last edited by
      #2

      @Nathan-Miguel said in How can I make qt detect a file extension in c ++:

      but how can I do it to detect the name of the extension that was opened

      you get the filename from the file dialog, where is your issue?!

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • E Offline
        E Offline
        EL-jos
        wrote on 7 Dec 2018, 12:29 last edited by
        #3

        Hi,
        uses the class QFileInfo, and you pass to its constructor your file or the path of your file then to see the extension of your file you will use the suffix() method of the class QFileInfo

        1 Reply Last reply
        4

        1/3

        7 Dec 2018, 12:23

        • Login

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