Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. The accept attribute of the <input /> tag does not work
Forum Update on Tuesday, May 27th 2025

The accept attribute of the <input /> tag does not work

Scheduled Pinned Locked Moved Unsolved QtWebEngine
3 Posts 2 Posters 650 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.
  • W Offline
    W Offline
    whatever_name
    wrote on 24 Jun 2019, 02:06 last edited by
    #1

    Setting <input type="file" id="filepicker" accept=".cpp, .html, .h, .png, .qdoc, .qml" />, then click the input button, the file dialog pops up, but the file type filter does not work.

    https://doc.qt.io/qt-5/qtwebengine-webengine-customdialogs-index-html.html

    0_1561341680136_dialog_filter.png

    0_1561342001409_dialog_filter2.png

    R 1 Reply Last reply 24 Jun 2019, 06:29
    0
    • W whatever_name
      24 Jun 2019, 02:06

      Setting <input type="file" id="filepicker" accept=".cpp, .html, .h, .png, .qdoc, .qml" />, then click the input button, the file dialog pops up, but the file type filter does not work.

      https://doc.qt.io/qt-5/qtwebengine-webengine-customdialogs-index-html.html

      0_1561341680136_dialog_filter.png

      0_1561342001409_dialog_filter2.png

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 24 Jun 2019, 06:29 last edited by
      #2

      @whatever_name
      Qt widgets or QML?

      Anyway the docs say:

      acceptedMimeTypes is ignored by the default implementation, but might be used by overrides.

      For QML follow the same principle.

      --- 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
      1
      • W Offline
        W Offline
        whatever_name
        wrote on 25 Jun 2019, 02:45 last edited by
        #3

        Qt widgets
        Thanks @raven-worx
        Overrides the chooseFiles() is a good solution for me.

        1 Reply Last reply
        0

        1/3

        24 Jun 2019, 02:06

        • 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