Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to display icon file and not path to file
Qt 6.12 LTS is out! See what's new in the release blog

How to display icon file and not path to file

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 540 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.
  • A Offline
    A Offline
    AlexandruToma
    wrote on last edited by
    #1

    Hello, I want to create a chat desktop app. I want to send files and messages, like any other messaging app. When I drop or select file from my pc appear only path to file and not icon file.
    I have this : Screenshot (2).png
    I want to achive this:29733619-b82c1786-89f6-11e7-9f4b-bb274e5199ed.jpg

    Or something like that.
    Can you please help me with some links or docs, that I can read to achive my goal.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You can get the icon for a file type via QFileIconProvider

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      A 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        You can get the icon for a file type via QFileIconProvider

        A Offline
        A Offline
        AlexandruToma
        wrote on last edited by
        #3

        @Christian-Ehrlicher Thank you, one more question please.
        Do you think i pick the right containers for my chat app and file sender app?
        Screenshot (3).png

        I cant find a function of QTextEdit to print the icon for the file

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