Questions tagged [qstackedwidget]

The QStackedWidget class provides a stack of widgets where only one widget is visible at a time. QStackedWidget can be used to create a user interface similar to the one provided by QTabWidget.

The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.

Official information can be found here.

96 questions
15
votes
2 answers

Why can't I set a layout for a page in a QStackedWidget in designer?

Steps to reproduce in designer for Qt 4.8.0 I create a new dialog form in Qt Designer I add a QStackedWidget to the dialog I set the layout of the dialog to make the stacked layout size with the dialog I add a few controls to page one in the…
cppguy
  • 3,611
  • 2
  • 21
  • 36
10
votes
4 answers

Qt QStackedWidget Resizing Issue

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…
David Ludwig
  • 967
  • 2
  • 12
  • 26
9
votes
3 answers

Resize QStackedWidget to the page which is opened

I want my QStackedWidget to resize to the page which is opened. I got a lot of widgets attached to the first page, but the rest pages have only one button. So they stay so big, and the first page is ok. How can I make my QStackedWidget to have the…
Darkgaze
  • 2,280
  • 6
  • 36
  • 59
6
votes
1 answer

How to use QStackedWidget in GUI?

I am new to Qt and am have to make a GUI having multiple windows for this I found QStackedWidget class using Qt designer tools. I added QStackedWidget using add new->Qt designer form class->Qstackwidget after that I created an object of this class…
vasu gupta
  • 305
  • 1
  • 3
  • 11
5
votes
1 answer

Transparent Background for Stacked Widgets in PyQt5

I've been trying to create a basic clock using PyQt5. The clock part works and the background image behind the clock loads but I am unable to get the background of the text to be transparent. I have tried both the way listed below and also with…
Klankins
  • 53
  • 1
  • 5
4
votes
2 answers

How to delete all widgets from QStackedWidget?

How to delete all widgets from QStackedWidget? I need simply remove all widgets from QStackedWidget.
htzfun
  • 1,231
  • 10
  • 41
4
votes
1 answer

Add page to QStackedWidget at Design time Qt Designer

I currently need 3 pages in my QStackedWidget. However, in Qt Designer I am only allowed to add 2 pages. After I click the next arrow on QStackedWidget, it takes me back to the previous page instead of taking me to a new page. How can I add a new…
MistyD
  • 16,373
  • 40
  • 138
  • 240
3
votes
2 answers

How to make nested StackedLayouts in PyQt5?

I am creating a PyQt5 application in Python for a university project that uses QStackedLayout to make it a single-windowed app, however, I can not figure out how to nest a Stacked Widget inside a Stacked Widget. When running the code (degraded for…
user8289382
3
votes
1 answer

QStackedWidget - Change page one by one

Is there a way to change the page of a QStackedWidget without appointing to the actual index. self.homeb.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(0)) So instead of just using a button to go directly to the appointed index 0, I…
Lucas Abreu
  • 63
  • 1
  • 7
3
votes
5 answers

PyQt: How to switch widgets in QStackedWidget

I have two buttons (wgtbtnA & wgtbtnB) placed on two different pages (page1 and page2, respectively) inside a parent object (objectName: stackedWidget). My dilemma is this: when I run the code, the arrows don't display in PyQt. Why? How do I…
Jeremy Scott
  • 167
  • 1
  • 3
  • 15
3
votes
1 answer

How to make different pages of a QStackedWidget of different sizes?

I have a QStackWidget with 2 pages. One page contains just 2 QLineEdit widget and another page contains a large QTextEdit. Does anyone know how to make one page larger than another so that the window still fits tightly for each page? In the Qt…
Kar
  • 6,063
  • 7
  • 53
  • 82
3
votes
1 answer

Qt - QStackedWidget usage

In my mainwidow.cpp constructor, I do this: TLDAlgoSettings = new TLDSettings(ui->algoSettingsStackedWidget); ui->algoSettingsStackedWidget->addWidget(TLDAlgoSettings); ui->algoSettingsStackedWidget->setCurrentWidget(TLDAlgoSettings); TLDSettings…
CTZStef
  • 1,675
  • 2
  • 18
  • 47
2
votes
1 answer

Change page of QstackedWidget with animation

I want to be able to change page of QStackedWidget with some kind of animation (like fade in/out or others...) after some research I find out maybe its possible with QGraphicsOpacityEffect, then I found this codes in here Fade In Your Widget // w is…
sanab3343
  • 154
  • 1
  • 11
2
votes
0 answers

Auto-resizing QStackedWidget

I have a class StackedWidget which inherits from QStackedWidget. The standard behaviour of QStackedWidget is that it adopts the size of its biggest element. What I want to do is force it to resize to its current element. I have already tried a…
slavic-d
  • 33
  • 3
2
votes
1 answer

How to make "finish" button in QStackedWidget

I trying to create "Finish" button in QStackedWidget. In a "checkButtons" function i checking current page index and set click events and text. I tried to check it by class name, but it doesn't work too. Here is a code: import sys from PyQt5.QtGui…
greenbeaf
  • 177
  • 1
  • 2
  • 9
1
2 3 4 5 6 7