Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Alternating back and front widgets for flashcards: One widget or two?
Qt 6.11 is out! See what's new in the release blog

Alternating back and front widgets for flashcards: One widget or two?

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 680 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jon Fernquest
    wrote on last edited by
    #1

    Hi all, I am a new user of PyQt and I am designing a simple flashcard app.

    The flashcards have two faces, front and back, and in my simple app, front has
    a next button and back has self-evaluation (1 thru 5) buttons.

    The app just iterates through the flashcards showing front then back, and then repeat.

    I can think of two ways to do this.
    First, since front and back are two widgets, I could make two widgets and pass control back and forth between them, or second, make one widget in which I re-render the buttons in a special button area down at the bottom of the screen?

    The examples I see that I could use as a model use the former but it re-creates widgets over
    and over again, which does not seem good.

    Any suggestions on the standard approach to this problem and any example code out there.

    Thanks for any suggestions.

    Sincerely,
    Jon Fernquest

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      If you something without animation, you can use a QStackedWidget that will contain both your widgets.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved