Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "VIEWS" on same window
Qt 6.11 is out! See what's new in the release blog

"VIEWS" on same window

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.0k 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.
  • V Offline
    V Offline
    vgnogueira
    wrote on last edited by
    #1

    I need some suggestions on how to implement this. This is a newbie question

    I want different views based on user state:

    -When user is disconnected I want to show a LOGIN FORM

    -After login I want to show a form with BUTTON like PAUSE and LOGOFF

    -If user press PAUSE button, show a form showing LOGOFF and PAUSE OFF button

    I don't want develop three main forms, just one (if possible) showing on and off a container.

    Thanks for any suggestion

    Valter

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on last edited by
      #2

      You can use QStackedWidget.
      For states you can use QStateMachine.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        A QStateMachine seems overly sophisticated for this, in my opinione. An enum with three states (LoggedOff, LoggedIn, Paused) should do the trick too.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0

        • Login

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