AttributeError: module 'PyQt5.QtGui' has no attribute 'QFileDialog' in ubuntu 18.04 1

AttributeError: module ‘PyQt5.QtGui’ has no attribute ‘QFileDialog’ in ubuntu 18.04

Changed it 
FROM -> QtGui.QFileDialog
TO -> QtWidgets.QFileDialog

Here is what the above code is Doing:
1. Importing the necessary modules
2. Creating a class called Window
3. Creating a method called __init__
4. Creating a method called open_file
5. Creating a method called run
6. Creating an instance of the class
7. Running the instance

Similar Posts