Overlapping widgets in QtDesigner

后端 未结 2 2013
-上瘾入骨i
-上瘾入骨i 2020-12-19 03:26

I want to overlay two widgets in QtDesigner: There is the big QTextBrowser, and below in the down right corner should be a non-interactiv label that I am going to use as a d

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-19 03:44

    I had the same problem but I did not manage to add Overlapping widgets in QtDesigner. Instead, I had to create the overlapping one dynamically after initializing my MainWindow.

    I've got two widgets:

    • dataset_tableWidget (tableWidget)
    • spinner_dataset_tableWidget (QtWaitingSpinner)

    and I wanted to make spinner_dataset_tableWidget spin over the dataset_tableWidget.

    After initializing the MainWindow you can do:

    #Crating QtWaitingSpinners dinamically and positioning it over the tableWidgets
    dataset_tableWidget = QtWaitingSpinner(dataset_tableWidget)
    dataset_tableWidget.setSizePolicy(dataset_tableWidget.sizePolicy())
    

提交回复
热议问题