[PyQt] from PyQt5.Qt import *

Zhao Lee redstone-cold at 163.com
Thu Jun 28 06:25:18 BST 2018


I  wrote these import statements in one of my PyQt5 project 
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtNetwork import *
from PyQt5.QtWebSockets import *


but now I could replace all of them with only " from PyQt5.Qt import * ", and the code still work , one example as following 


import sys
# from PyQt5.QtWebEngineWidgets import QWebEngineView
# from PyQt5.QtWidgets import QApplication
from PyQt5.Qt import *
app = QApplication(sys.argv)
browser = QWebEngineView()
browser.load(QUrl('https://www.youtube.com/watch?v=YORWJTOCHu4'))
browser.show()
app.exec_()


any drawback along with the single line import ?





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180628/90ce9854/attachment.html>


More information about the PyQt mailing list