Skip to content

Instantly share code, notes, and snippets.

@luelista
Last active May 2, 2022 20:00
Show Gist options
  • Save luelista/c0f4dfed72f4d443e7353ee8e51d8528 to your computer and use it in GitHub Desktop.
Save luelista/c0f4dfed72f4d443e7353ee8e51d8528 to your computer and use it in GitHub Desktop.
Test for Qt-Ads bug
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QLabel
from PyQt5.QtCore import Qt
from PyQtAds import ads
def makewindow(name):
txt = QTextEdit()
txt.setText(name)
child = ads.CDockWidget(name)
child.setWidget(txt)
return child
app = QApplication(sys.argv)
wnd = QMainWindow()
manager = ads.CDockManager(wnd)
manager.addDockWidgetTab(ads.CenterDockWidgetArea, makewindow("Center1"))
manager.addDockWidgetTab(ads.CenterDockWidgetArea, makewindow("Center2"))
manager.addDockWidgetTab(ads.CenterDockWidgetArea, makewindow("Center3"))
manager.addDockWidgetTab(ads.LeftDockWidgetArea, makewindow("Left"))
manager.addDockWidgetTab(ads.LeftDockWidgetArea, makewindow("Left2"))
manager.addDockWidgetTab(ads.RightDockWidgetArea, makewindow("Right"))
manager.addDockWidgetTab(ads.RightDockWidgetArea, makewindow("Right2"))
wnd.show()
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment