qstackedwidget

Switching between frames without erasing contents of each frame

感情迁移 提交于 2020-01-30 10:56:07
问题 I've been writing a GUI using the below setCentralWidget method (simplified here) for transitioning between frames - but didn't realize until pretty far in that it erased each window upon moving to the next (which I need to avoid). My actual code has entry boxes that need to be kept in their completed state for when the user goes back to that frame to revise, etc. I'd like to rewrite with as little change to my hierarchy as possible - most likely using QStackedWidget or something similar. The

Qt QStackedWidget Resizing Issue

笑着哭i 提交于 2020-01-22 19:00:05
问题 I have a simple QStackedWidget with 3 different QWidgets in it. The minimum sizes of the QWidgets are (350x200), (200x100), and (450x450). So the problem I'm having is when I resize the QStackedWidget, it has a minimum size of the largest QWidget within it. So if I switch to the second QWidget, (which is the QWidget with the size of (200x100)), the QStackedWidget will only size down (450x450) because of the largest QWidget inside of it. I would like it to size down to fit the current QWidget

Using QTreeWidgetItems setData to store a QStackedWidget or QVariant

寵の児 提交于 2019-12-24 19:33:51
问题 I am trying to make a QTreeWidget such that each row contains a series of comboboxes. Depending on how the user interacts with the comboboxes I would like certain comboboxes to becomes line edits and some to become buttons. It was suggested here that a QStackedWidget would serve my needs and its done a pretty good job except now I need a way to alter the QStackedWidget that is next to the one that contains the combobox sending me an indexChanged signal. (Basically I want to change the

Setting up stateChanged signal in QStackedWidget, pyqt

给你一囗甜甜゛ 提交于 2019-12-13 02:26:16
问题 I have an example of QStacked Widget code from internet, wich generates own layout for each child (below) import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class stackedExample(QWidget): def __init__(self): super(stackedExample, self).__init__() self.leftlist = QListWidget() self.leftlist.insertItem(0, 'Contact') self.leftlist.insertItem(1, 'Personal') self.leftlist.insertItem(2, 'Educational') self.stack1 = QWidget() self.stack2 = QWidget() self.stack3 = QWidget() self.stack1UI

Adding QQuickWidget in QStackedWidget

柔情痞子 提交于 2019-12-12 03:37:51
问题 I am trying to add a qquickwidget along with some other qwidgets in qstackedwidget. But when I am trying to set the current widget to the qquickwidget nothing appears on the window. Is there something else that need to be done? I am also setting the view property of the qquickwidget to true QQuickWidget* mRoom = new QQuickWidget; connect(mRoom, SIGNAL(statusChanged(QQuickWidget::Status)), this, SLOT(StatusChanged(QQuickWidget::Status))); mRoom->setSource(QUrl::fromLocalFile("C:/Users/visjain