Added toxygen/third_party/qweechat

This commit is contained in:
emdee 2022-11-20 18:44:17 +00:00
parent 424e15b31c
commit 0b1eaa1391
4 changed files with 33 additions and 8 deletions

0
toxygen/third_party/__init__.py vendored Normal file
View file

View file

@ -700,10 +700,12 @@ class MainWindow(QtWidgets.QMainWindow):
def weechat_console(self):
try:
from qweechat.qweechat import MainWindow as MainWindow
# WeeChat backported from PySide6 to PyQt5
from third_party.qweechat import MainWindow as MainWindow
from third_party.qweechat import config
LOG.info("Adding WeechatConsole")
except Exception as e:
LOG.exception(f"ERROR WeechatConsole {e} {sys.path}")
LOG.exception(f"ERROR WeechatConsole {e}")
MainWindow = None
return
LOG.debug(f"calling {MainWindow}")
@ -752,6 +754,11 @@ class MainWindow(QtWidgets.QMainWindow):
self._we.setGeometry(geometry)
self._we.resize(font_width*80+20, font_width*40)
self._we.list_buffers.setSizePolicy(QtWidgets.QSizePolicy.Preferred,
QtWidgets.QSizePolicy.Preferred)
self._we.stacked_buffers.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Expanding)
self._we.show()
# or self._we.eval_in_thread()
return