Last active
May 2, 2022 20:00
-
-
Save luelista/c0f4dfed72f4d443e7353ee8e51d8528 to your computer and use it in GitHub Desktop.
Test for Qt-Ads bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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