[PyQt] from PyQt5.Qt import *
Zhao Lee
redstone-cold at 163.com
Thu Jun 28 06:30:07 BST 2018
Sorry , I got my answer from the doc
http://pyqt.sourceforge.net/Docs/PyQt5/Qt.html#PyQt5-Qt
在2018年06月28 13时25分, "Zhao Lee"<redstone-cold at 163.com>写道:
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/954cdd41/attachment.html>
More information about the PyQt
mailing list