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. QFileDialog Use native dialog despite of Q_OBJECT
Forum Updated to NodeBB v4.3 + New Features

QFileDialog Use native dialog despite of Q_OBJECT

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 755 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.
  • Q Offline
    Q Offline
    QtAndMore
    wrote on last edited by aha_1980
    #1

    Hello together,

    I have a problem with QFileDialog.
    For some reasons, I don't want to use the Qt user dialog anymore. I want to use the native (Windows) dialog.
    The documentation says, that the native dialog is default:
    0_1552462026360_b2a52806-1fee-4701-9e24-5e840e821035-image.png

    In my case I don't call the option DontUseNativeDialog, but I use the Q_OBJECT macro in the class of FileOpenSaveDialog.0_1552463192539_7feaece7-ac84-4804-b048-104021b9af47-image.png

    I treid to set the option DontUseNativeDialog to false, but it did not help.

    Where is my mistake?!
    How is it possible to use native dialog when using Q_OBJECT?

    Thank you in advance!

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

      Simply don't subclass fro QFileDialog - from what you're showing it's not needed.

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

      1 Reply Last reply
      3
      • Q Offline
        Q Offline
        QtAndMore
        wrote on last edited by
        #3

        Sadly it is needed, or am I wrong?

        0_1552478985195_d0f011c7-0470-4499-8592-06aefa197fb2-image.png
        0_1552478826696_82884326-4ff5-43e5-bd67-e40e3c97105a-image.png

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

          I don't see where you call a custom FileOpenSaveDialog function here.
          And btw: toAscii() is absolutely wrong

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

          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