@capink: setTabStopWidth() is now setTabStopDistance().
Code:
try:
import qt.core as QtGui
from qt.core import (Qt, QIcon, QPixmap, QLabel, QDialog, QHBoxLayout,
QTableWidgetItem, QFont, QLineEdit, QComboBox,
QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime,
QTextEdit,
QListWidget, QAbstractItemView)
from qt.core import QRegularExpressionValidator as QRegExpValidator
from qt.core import QRegularExpression as QRegExp
using_Qt6 = True
except ImportError:
using_Qt6 = False
try:
from PyQt5 import Qt as QtGui
from PyQt5.Qt import (Qt, QIcon, QPixmap, QLabel, QDialog, QHBoxLayout,
QTableWidgetItem, QFont, QLineEdit, QComboBox,
QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime,
QRegExpValidator, QRegExp, QTextEdit,
QListWidget, QAbstractItemView)
except ImportError:
from PyQt4 import QtGui
from PyQt4.Qt import (Qt, QIcon, QPixmap, QLabel, QDialog, QHBoxLayout,
QTableWidgetItem, QFont, QLineEdit, QComboBox,
QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime,
QRegExpValidator, QRegExp, QTextEdit,
QListWidget, QAbstractItemView)