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
1
vote
1 answer

setCurrentIndex of QStackedWidget from outside its class

I am trying to set index of the StackedWidget from outside its class, but getting an error that object has no attribute. My code is below (I apologize for messed up indentations, it didn't paste properly): import sys from functools import…
goryef
  • 1,337
  • 3
  • 22
  • 37
1
vote
1 answer

QStackWidget navigate from page1 to page 2

I have a base class MainWindow which inherits from QMainWindow . MainWindow has QSTackedWidget in its Ui file. I have Page1 and Page2 in different classes All page widgets in there are seperate classes derived from QWidget. QMainWindow implements…
Rubina
  • 123
  • 1
  • 17
1
vote
1 answer

setWindowState from QMainWindow from QWidget

I have a QMainWindow Application which also includes an QStackedWidget. The pages of the QstackedWidget are promoted to ui widgets for example heating_widget.ui If I use a button slot on my QMainWindow I can use this to get my application to…
CADman
  • 11
  • 3
1
vote
1 answer

Update nested QStackWidget when QListWidget index changes

I'm facing a problem that I cannot solve, even if it shouldn't be difficult. I have a QListWidget with 5 items (so 5 rows) and 2 related QStackedWidgets. The first made of 3 pages: the first page of it contains another nested QStackedWidgets with 2…
matteo
  • 4,683
  • 9
  • 41
  • 77
1
vote
1 answer

stacked widget page

i cannot go back to the first page of the stacked widget on, when i click the cancel button (from the cancel_button_clicked(self): function) from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMessageBox class Ui_form(object): …
XYLO
  • 13
  • 4
1
vote
1 answer

Using QStackedWidget for multi-windowed PyQt application

I have a multi-windowed PyQt5 (Python 3.6.2 with Qt 5.9.0) application which works perfectly when run in a standard desktop (i.e. window managed) environment. My target platform is an embedded device (Raspberry Pi, i.MX6, etc. for example), where I…
jars121
  • 1,127
  • 2
  • 20
  • 35
1
vote
1 answer

Creating, handling and switching between windows QTCreator

My research into the question suggests that I'm somewhat beating a dead horse, however I can't seem to get a conclusive answer. I'm using QT Creator to create a GUI that will help interface with a register of units(simple objects, with some ID's and…
NT93
  • 316
  • 2
  • 15
1
vote
1 answer

Setting up stateChanged signal in QStackedWidget, pyqt

I have an example of QStacked Widget code from internet, which generates its own layout for each child (below) import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class stackedExample(QWidget): def __init__(self): …
Maroth
  • 195
  • 2
  • 7
1
vote
0 answers

QStackedWidget doesn't fire Drag and Drop events

I got simple class MyStackedWidget but looks like it doesn't fires drag and drop events - what am I doing wrong? #ifndef MYSTACKEDWIDGET_H #define MYSTACKEDWIDGET_H #include class MyStackedWidget : public…
htzfun
  • 1,231
  • 10
  • 41
1
vote
2 answers

Change background color in a specific widget of a Qt Stacked Widget

I am developing a Qt application using Qt Creator that is based on a stacked widget. I would like to independently change the background color of each page of the stacked widget (e.g. first page blue, second page red, etc.). However, when I add…
maupertius
  • 1,518
  • 4
  • 17
  • 30
0
votes
0 answers

{Python: Stacked Widgets} next button not working (trying to switch widgets)

I am trying to set up stacked widgets. I have a main page and I am trying to go to the next page which will be part of my stacked widgets. I am trying to switch to next page with a pushButton_2 named "Next". I set up my second page to be QtWidget…
0
votes
0 answers

Issue with an auto-resizing QStackedLayout

I try to implement an auto-resizing QStackedLayout: what I would like is that the QStackedLayout change to the preferred size of the current shown widget. In addition, this QStackedLayout contains, among other widgets, ones whose the size can change…
Beatussum
  • 1
  • 1
0
votes
1 answer

What's the right way of switching between overlapping layouts? (stacking or replacing layouts)

I'm a PyQT amateur and I have a main layout which is a parent to a left layout and a right layout. With the press of a button, I want to replace the left layout with another one. The "overlapping" left layout should display different things but keep…
avroom
  • 23
  • 7
0
votes
1 answer

Embedding a custom widget into a stacked widget page WITHOUT using qtdesigner

I am trying to embed two custom widgets into the pages of a stacked widget on a dialog page. I have mocked up my problem using the main script dialog.py which has a stacked widget with two pages promoting widget_1_UI from widget_1.py and widget_2_UI…
0
votes
0 answers

Pyqt 5 Application crashes without Error Message when changing current Widget of QStackedWidget

I'm currently writing an PYQT5 GUI Application, where it is possible to switch between multiple widgets in the same Main Window. I'm using a QStackedWidget for that, where I've added all the other Widgets. For switching between them, I just set the…