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
0
votes
0 answers

How to add multiple scenes to a graphicsview or layers to a scene that would allow me to just hide/show certain marks in PyQt5

I want to know how to keep scene widgets after add them to scene for later. After user's click on marker button, marker feature active and with rightclick can mark points in QGraphicscene. Here is my code: from PyQt5.QtWidgets import QMainWindow,…
md.119
  • 29
  • 7
0
votes
0 answers

when I called a function under stack widget page it multiples the line edit operation of specific widget

SO , I am new in the Pyqt design. I use stacked widget for the setup and I do some operations in each widget. My problem is that, for example when I enter a number, say 50, in lineedit slot of Page2 it is fine I print what I enter. that is 50.…
0
votes
1 answer

How do I refresh QWidget to display the current information?

I have a PySide2 GUI that accepts a number from the user on page one then does some calculations and displays the results on page two. Each page is a QWidget within a QStackedWidget. There is a pushbutton on page two, the results page, that sends…
0
votes
0 answers

Why can't Qt build my project after including a QStackedWidget-inherited class?

I want to subclass the "QStackedWidget" class to add some public slots but when I add its header and source to my Qt project, my project can't be built completely and after showing many compiling errors and warnings, Qt gets crashed. This is my…
0
votes
1 answer

Including QStackedLayout messes up layout

My main layout is an HBoxLayout with a Textedit on the left and some PushButtons in a VBoxlayout on the right. And there is some nesting for the buttons on the top_right. but1 = QPushButton('button 1') but2 = QPushButton('button 2') but3…
mahkitah
  • 562
  • 1
  • 6
  • 19
0
votes
0 answers

PyQt running screen 2 times (stackedWidget)

I'm developing a simple application using PyQt. Basically, when a I press the button "Go Back to Screen 1" on screen 2 my application goes to screen 1. However, it executes the method of screen 2 two times. The best way to understand the problem…
0
votes
1 answer

Is it possible to have each page of a Stacked Widget specified in a separate ui file

I am using the Stacked Widget in Qt Creator v4.14.2. Right now all of the items for each page reside in the mainwindow.ui file. I do not have a problem switching between pages. I am wanting to put the items for each Stacked Widget page in a separate…
0
votes
1 answer

Class for Each QStackedWidget Page

I am using PyQt5 and Qt-Designer to design an application. How do I instantiate a class for each page on QstackedWidget. I can do it in a single class, all widgets belong to the same QMainWindow. But, the issue is that the file will get too long…
Grabinuo
  • 334
  • 2
  • 11
0
votes
1 answer

Problem with changing QStackedWidget index

Let me describe my problem. I'm using PySide2, QtDesigner and Python. In QtDesigner i created QStakedWidget and promoted my custome pages. Im using project structure suggested here https://stackoverflow.com/a/53926554/14071081. I want to access …
kornelHub
  • 114
  • 8
0
votes
2 answers

In PyQt5, how do I move to another label when clicking a button from a label on a QStackedWidget?

In PyQt5, how do I move to another label when clicking a button from a label on a StackedWidget? When you click pushButton_3, I want the After screen(After label) to appear. What code should I use to display the After screen(After label)? …
LeeJiHye
  • 23
  • 4
0
votes
4 answers

why opening 2 windows?

My QT application is opening two windows. One empty and one with the button1 showing. Could someone tell me why? I've tried everything, but I can't find the source of the problem. If anyone can help me. main.cpp #include #include…
0
votes
1 answer

PyQt5: QStackedWidget background is visible/white during animation

I'm using Python 3.8 and PyQt5 to write a GUI with "Designer" installed with the Qt5-Package and then translated (with pyuic5) to a .py file. Actually I have a fading animation, when the current index of the stacked widget changes (it…
David
  • 65
  • 10
0
votes
1 answer

stack widget pages using pushbutton in Qt

How to navigate QStackWidget pages using QPushButtons? Which method needs to be called whenever pushbutton is clicked, so that it opens a particluar stackwidget page. Thanks & Regards,
user13605962
0
votes
1 answer

Using QStackedWidget in PyQt5

I have QStackedWidget in ApplicationWindow class and buttons which are going to point to different QWidgets in MenuWindow. I need a help with writing a function which would change the CurrentWidget according to button clicked - e.g. login_button…
user430953
  • 191
  • 2
  • 19
0
votes
1 answer

How to show the correct GUI on a QStackedWidget depending on the choice on a QListWidget

How to properly show the right user interface on the QStacked Widget depending on the choice on QListWidget? Below I have a QDialog that contains: 1 QListWidget 1 QStackedWidget Depending on the selected choice of the list, for example, Vessel…
Emanuele
  • 2,194
  • 6
  • 32
  • 71