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
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved QtWebEngine
3 Posts 2 Posters 640 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.
  • W Offline
    W Offline
    whatever_name
    wrote on 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

    raven-worxR 1 Reply Last reply
    0
    • W whatever_name

      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

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on 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 last edited by
        #3

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

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