Skip to content
QtWS25 Last Chance
  • 0 Votes
    7 Posts
    944 Views
    D
    @Axel-Spoerl That's what I was fearing, but thanks for confirming.
  • 0 Votes
    4 Posts
    460 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.
  • How to get overwrite result from QFileDialog

    Solved General and Desktop qfiledialog
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    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.
  • QFileDialog & favorites/customisation

    Unsolved General and Desktop qfiledialog
    2
    0 Votes
    2 Posts
    456 Views
    B
    Hi, there is https://doc.qt.io/qt-5/qfiledialog.html#setSidebarUrls, is that what you want?
  • Absurd QT File Handling Issue(QFile)

    Solved C++ Gurus qfiledialog qfile qt5.6 c++ qt file read
    11
    0 Votes
    11 Posts
    2k 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!
  • How to show the fileDialog window on top of all windows

    Unsolved General and Desktop qfiledialog
    2
    0 Votes
    2 Posts
    511 Views
    sierdzioS
    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
  • QFileDialog > look In as editable entry

    Unsolved General and Desktop qfiledialog
    11
    0 Votes
    11 Posts
    1k 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.
  • 0 Votes
    4 Posts
    671 Views
    jsulmJ
    @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
  • 0 Votes
    5 Posts
    1k Views
    J
    @jsulm Looks like that is the only way to get the scaled widget correctly. Thanks!
  • 0 Votes
    3 Posts
    788 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.
  • 0 Votes
    7 Posts
    2k Views
    jsulmJ
    @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/
  • 0 Votes
    3 Posts
    921 Views
    SGaistS
    Hi, One base rule: all GUI manipulation must be done in the main thread (well the one that started the QApplication event loop).
  • Get children of QFileDialog derived class

    Unsolved General and Desktop qfiledialog
    3
    0 Votes
    3 Posts
    758 Views
    jsulmJ
    @GrahamLa Where and when do you call func()?
  • 0 Votes
    16 Posts
    3k 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.
  • 0 Votes
    5 Posts
    882 Views
    jsulmJ
    @Hcf134 Maybe you should first call dialog.setMimeTypeFilters(mimeTypeFilters); and then dialog.selectMimeTypeFilter(selecttype);
  • 0 Votes
    3 Posts
    1k Views
    M
    I am using Qt 5.10.1, on CentOS 7
  • How to save Multiple File in

    Unsolved General and Desktop qfiledialog qfile qt 5.6
    3
    0 Votes
    3 Posts
    1k Views
    Y
    @SGaist Thank you for answer. From your suggestion, I need to create my own Dialog box.
  • A couple of problems with QFileDialog

    Unsolved General and Desktop qfiledialog
    8
    0 Votes
    8 Posts
    7k Views
    PsychotronP
    @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]
  • File modes of QFileDialog

    Unsolved General and Desktop qfiledialog
    2
    0 Votes
    2 Posts
    993 Views
    SGaistS
    Hi and welcome to devnet, IIRC, you can select one or the other but not both at the same time.