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::getOpenFileNames works on Windows but not on Linux
QtWS25 Last Chance

QFileDialog::getOpenFileNames works on Windows but not on Linux

Scheduled Pinned Locked Moved General and Desktop
11 Posts 2 Posters 2.8k 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.
  • B Offline
    B Offline
    bergerbits
    wrote on last edited by
    #1

    I am using QFileDialog::getOpenFileNames to get list of user selected files. It works as expected on Windows but on Linux (Fedora 14) the same code does not allow multiple file selections. On Linux QFileDialog immediately closes when first item is selected. It doesn't allow shift-selection and it doesn't even wait for <Open> button click as it does on Windows. Does anyone know why this is happening?

    I am running Linux from my Windows laptop via cygwin's XWin Server and ssh'ing into the Linux server where I run code. I'm running locally for Windows version.

    Any feedback appreciated. Thanks!

    Suzanne

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bergerbits
      wrote on last edited by
      #2

      Oh ... i am using Qt 4.7

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Are you tied to that specific old version of Qt ? Can you use 4.8.5 ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bergerbits
          wrote on last edited by
          #4

          Unfortunately, I believe we are tied to Qt 4.7. Are their known issues related to Windows/Linux QFileDialog?

          I will ask my supervisor if it will be possible to migrate to newer release but when i asked previously their was concern for dependencies and schedule.

          Thanks

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Tell him you talk about Qt 4.8 and not Qt 5, that might help

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bergerbits
              wrote on last edited by
              #6

              Thanks for your feedback. Is it that there is known issue with Qt's 4.7 FileDialog on Linux? or is it simply that better support/feedback would be provided with Qt 4.8.5 ?

              I'm also wondering if the problem could be caused by running this Linux/Fedora Qt app from remote connection? ie: windows laptop running cygwin/X Server and remote login to Linux server. I've had problems in the past running interactive graphics via remote connections.

              Thanks again!

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                I don't know, but you can search for "Qt 4.7 known issues".

                There have been a lot of bug fixes done in between so unless you're completely locked, having the latest version in a series is better.

                There could be indeed some bad interaction with such a setup. Testing it directly on the linux machine can help narrow down the problem.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bergerbits
                  wrote on last edited by
                  #8

                  Thanks ...

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bergerbits
                    wrote on last edited by
                    #9

                    Yes. I was able to confirm that it was the remote connection that was causing the issue. My sup has approved moving to Qt 8.5 anyways :)
                    Thanks

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      bergerbits
                      wrote on last edited by
                      #10

                      oh ... I meant Qt 4.8.5 ... it's the end of a day

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        You're welcome,

                        If building Qt yourself is an option, you could consider building the latest 4.8 version from git.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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