testbrowser: Support PyQt6
This commit is contained in:
parent
9d87bf3329
commit
71d1be9812
|
|
@ -23,9 +23,16 @@
|
|||
import sys
|
||||
import argparse
|
||||
|
||||
from PyQt5.QtCore import QUrl
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
||||
try:
|
||||
from PyQt6.QtCore import QUrl
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
from PyQt6.QtWebEngineWidgets import QWebEngineView
|
||||
print("Using PyQt6")
|
||||
except ImportError:
|
||||
from PyQt5.QtCore import QUrl
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
||||
print("Using PyQt5")
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
|
|||
Loading…
Reference in New Issue