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 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

    raven-worxR 1 Reply Last reply
    0
    • N Nathan Miguel

      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

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on 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 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

        • Login

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