Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qfiledialog

    Log in to post
    • All categories
    • D

      Solved How to simulate user input to a native QFileDialog in Windows?
      General and Desktop • qfiledialog simulation input windows • • dave2

      7
      0
      Votes
      7
      Posts
      177
      Views

      D

      @Axel-Spoerl That's what I was fearing, but thanks for confirming.

    • K

      Solved Return empty getExistingDirectory for Android SDK >= 30
      Mobile and Embedded • android 11 file management qfiledialog • • Kafabih

      4
      0
      Votes
      4
      Posts
      144
      Views

      M

      In the bug report you write that
      "have to edit what I reported here before is wrong method. So the right method is getOpenFileNames. I am apologized."

      Of course, you should have updated your post here.

      More often than not, a problem is not in the API, but new conditions (such as new OS version) that expose a problem in how you use it. And you don't tell anything about it.

    • D

      Solved How to get overwrite result from QFileDialog
      General and Desktop • qfiledialog • • djsuson

      6
      0
      Votes
      6
      Posts
      355
      Views

      SGaist

      Hi,

      Just a recommendation: you should put a note in your code about that requirement otherwise there will likely be someone in the future (yourself included) that will wonder why there's that ! char there.

    • D

      Unsolved QFileDialog & favorites/customisation
      General and Desktop • qfiledialog • • Dariusz

      2
      0
      Votes
      2
      Posts
      186
      Views

      B

      Hi, there is https://doc.qt.io/qt-5/qfiledialog.html#setSidebarUrls, is that what you want?

    • S

      Solved Absurd QT File Handling Issue(QFile)
      C++ Gurus • qfiledialog qfile qt5.6 c++ qt file read • • Sabhya Sood

      11
      0
      Votes
      11
      Posts
      1276
      Views

      S

      @JonB Thanks for your insight. I did as you suggested and found one of my local variable's address a nullptr(though not sure where it came from). I changed a few lines of code and apparently, my code works fine now. @Christian-Ehrlicher @J-Hilk thanks!

    • C

      Unsolved How to show the fileDialog window on top of all windows
      General and Desktop • qfiledialog • • ChiaoHuang

      2
      0
      Votes
      2
      Posts
      246
      Views

      sierdzio

      I don't know. You need to set the dialog to be "ApplicationModal" or set "modal" property: https://doc.qt.io/qt-5/qdialog.html#modal-prop
    • D

      Unsolved QFileDialog > look In as editable entry
      General and Desktop • qfiledialog • • Dariusz

      11
      0
      Votes
      11
      Posts
      648
      Views

      B

      @mrjj
      I read it from the qt source code.
      I always do that when I want to cheat by using findChild / findChildren, to make sure I can find the right object.

    • M

      Unsolved How to save a text file directly without using QfileDialog box?
      General and Desktop • qt 5.4 c++ qfiledialog qtextedit • • Mr-Workalot

      4
      0
      Votes
      4
      Posts
      291
      Views

      jsulm

      @Mr-Workalot But what location do you need? Where do you want to store the file? It is really not clear from your description.
      Did you check the link I provided: https://doc.qt.io/qt-5/qstandardpaths.html ?
      Example: to store in Documents folder call https://doc.qt.io/qt-5/qstandardpaths.html#writableLocation with QStandardPaths::DocumentsLocation as parameter

    • J

      Unsolved QFileDialog is not scaled the same way as the QApplicaiton with high DPI monitor
      General and Desktop • qt5.14 highdpi qfiledialog • • johnyang

      5
      0
      Votes
      5
      Posts
      566
      Views

      J

      @jsulm Looks like that is the only way to get the scaled widget correctly. Thanks!

    • A

      Solved QfileDialog::Getopenfilename does not open the second time and after
      General and Desktop • qimage qpixmap qfiledialog • • aramaz

      3
      0
      Votes
      3
      Posts
      398
      Views

      A

      @Bonnie said in QfileDialog::Getopenfilename does not open the second time and after:

      Remove that static.

      Static local variables

      Variables declared at block scope with the specifier static or thread_local (since C++11) have static or thread (since C++11) storage duration but are initialized the first time control passes through their declaration (unless their initialization is zero- or constant-initialization, which can be performed before the block is first entered). On all further calls, the declaration is skipped.

      So with the static keyword, getOpenFileName will only be called at the first time.

      Thanks! I just realized that I should not have copy pasted that line of code without looking at it closer.

      Cheers.

    • M

      Unsolved File Browser with context menu to unzip files
      General and Desktop • qfiledialog qtreeview qfilesystemmode • • mahesh_j

      7
      0
      Votes
      7
      Posts
      899
      Views

      jsulm

      @mahesh_j said in File Browser with context menu to unzip files:

      But I don't know what actions to add to the QMenu

      The actions you need. You have to create such a pop-up menu.

      Take a look at http://quazip.sourceforge.net/

    • F

      Unsolved Weird behaviour with QFileDialog::getExistingDirectory
      General and Desktop • c++ qfiledialog • • FrankE

      3
      0
      Votes
      3
      Posts
      526
      Views

      SGaist

      Hi,

      One base rule: all GUI manipulation must be done in the main thread (well the one that started the QApplication event loop).

    • G

      Unsolved Get children of QFileDialog derived class
      General and Desktop • qfiledialog • • GrahamLa

      3
      0
      Votes
      3
      Posts
      493
      Views

      jsulm

      @GrahamLa Where and when do you call func()?

    • E

      Unsolved Checking run time characteristics for QFileDialog::getOpenFileName()
      General and Desktop • qfiledialog getopenfilename run time responsiveness file management • • elfring

      16
      0
      Votes
      16
      Posts
      2046
      Views

      E

      you are looking at the strace output in real time

      Not really. - I would start such program tracing only after a personal delay to notice that data processing for the function “QFileDialog::getOpenFileName” might take longer than what I would usually expect.
      (I might be more patient under other circumstances.)

      what you would see is the last line of output would "hang"

      This did not happen. The dialogue software might be still busy with other stuff.
      Additional activities might distract then from temporary technical difficulties.

      just as you went into a "delay", and that would be your indication as to why....

      I found questionable software behaviour also for other components in the suggested way so that corresponding clarification requests and bug reports were published.

    • H

      Unsolved Version 5.10.1 windows mingw32 release question about the Class QFileDialog
      General and Desktop • qfiledialog • • Hcf134

      5
      0
      Votes
      5
      Posts
      597
      Views

      jsulm

      @Hcf134 Maybe you should first call

      dialog.setMimeTypeFilters(mimeTypeFilters);

      and then

      dialog.selectMimeTypeFilter(selecttype);
    • M

      Unsolved Want a QFileDialog that displays only executable files, but QDir::Filter values are used differently by QFileDialog than by QDir::entryInfoList(..)
      General and Desktop • qdir qfiledialog linux filters • • mbrochmann

      3
      0
      Votes
      3
      Posts
      814
      Views

      M

      I am using Qt 5.10.1, on CentOS 7

    • Y

      Unsolved How to save Multiple File in
      General and Desktop • qfiledialog qfile qt 5.6 • • Yash001

      3
      0
      Votes
      3
      Posts
      1113
      Views

      Y

      @SGaist Thank you for answer. From your suggestion, I need to create my own Dialog box.

    • Psychotron

      Unsolved A couple of problems with QFileDialog
      General and Desktop • qfiledialog • • Psychotron

      8
      0
      Votes
      8
      Posts
      5340
      Views

      Psychotron

      @SGaist

      void DisplayDlg::on_pushButtonLoad_clicked() { QString fileName = QFileDialog::getOpenFileName(Q_NULLPTR, tr("Open Overlay"), "", "XML (*.xml)"); //This line crashes sometimes. Haven't seen it crash if I add option DontUseNativeDialog. ... } mfc140d.dll!000007fec6f97e0c() Unknown mfc140d.dll!000007fec6f5342c() Unknown mfc140d.dll!000007fec6f52832() Unknown user32.dll!0000000076ed9bdd() Unknown user32.dll!0000000076ee6189() Unknown user32.dll!0000000076ee4ea7() Unknown user32.dll!0000000076ee4f36() Unknown user32.dll!0000000076ee4f6c() Unknown comdlg32.dll!000007feff1628e8() Unknown qwindowsd.dll!000007fec494e5d1() Unknown qwindowsd.dll!000007fec495b823() Unknown qwindowsd.dll!000007fec495b7a5() Unknown Qt5Widgetsd.dll!00000000650ca1d2() Unknown Qt5Widgetsd.dll!0000000065048a8e() Unknown Qt5Widgetsd.dll!0000000065048920() Unknown MYDLL.dll!DisplayDlg::on_pushButtonLoad_clicked() Line 683 C++ MYDLL.dll!DisplayDlg::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 128 C++ MYDLL.dll!DisplayDlg::qt_metacall(QMetaObject::Call _c, int _id, void * * _a) Line 184 C++ Qt5Cored.dll!000000006715df44() Unknown Qt5Cored.dll!00000000671a5e04() Unknown Qt5Cored.dll!00000000671a5488() Unknown Qt5Widgetsd.dll!0000000064fe877d() Unknown Qt5Widgetsd.dll!0000000064fea8b4() Unknown Qt5Widgetsd.dll!0000000064fe9977() Unknown Qt5Widgetsd.dll!0000000064fe8f37() Unknown Qt5Widgetsd.dll!0000000064cd695d() Unknown Qt5Widgetsd.dll!0000000064fe89cb() Unknown Qt5Widgetsd.dll!0000000065006011() Unknown Qt5Widgetsd.dll!0000000064c76f3e() Unknown Qt5Widgetsd.dll!0000000064c7217c() Unknown Qt5Cored.dll!000000006714f666() Unknown Qt5Cored.dll!00000000672b5cbb() Unknown Qt5Widgetsd.dll!0000000064c79633() Unknown Qt5Widgetsd.dll!0000000064d20e37() Unknown Qt5Widgetsd.dll!0000000064d1f60a() Unknown Qt5Widgetsd.dll!0000000064c76f3e() Unknown Qt5Widgetsd.dll!0000000064c71973() Unknown Qt5Cored.dll!000000006714f666() Unknown Qt5Cored.dll!00000000672b5cbb() Unknown Qt5Guid.dll!000007fedd97c19a() Unknown Qt5Guid.dll!000007fedd97ed13() Unknown Qt5Guid.dll!000007fedd939a45() Unknown qwindowsd.dll!000007fec499fe82() Unknown Qt5Cored.dll!000000006720ad0d() Unknown [External Code] MYAPP.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 26 C++ [External Code]
    • S

      Unsolved File modes of QFileDialog
      General and Desktop • qfiledialog • • ssmo3

      2
      0
      Votes
      2
      Posts
      825
      Views

      SGaist

      Hi and welcome to devnet,

      IIRC, you can select one or the other but not both at the same time.