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. stackeLayout->setCurrentIndex vs connect(......, , , setCurrentIndex)
QtWS25 Last Chance

stackeLayout->setCurrentIndex vs connect(......, , , setCurrentIndex)

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 782 Views
  • 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.
  • B Offline
    B Offline
    buildroot
    wrote on last edited by buildroot
    #1

    Hi everyone,

    just to see how it works, i made the code attached. It is not clear to me, line on the page 71 worked fine but custom slot (setPage) did not work.
    Connect calls the slot, program go through if statements, but i do not see other page of stackedLayout.
    What am i missing?
    Thank you!
    0_1521501632390_Screenshot from 2018-03-20 00-20-03.png

    jsulmJ DiracsbracketD 2 Replies Last reply
    0
    • B buildroot

      Hi everyone,

      just to see how it works, i made the code attached. It is not clear to me, line on the page 71 worked fine but custom slot (setPage) did not work.
      Connect calls the slot, program go through if statements, but i do not see other page of stackedLayout.
      What am i missing?
      Thank you!
      0_1521501632390_Screenshot from 2018-03-20 00-20-03.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @buildroot said in stackeLayout->setCurrentIndex vs connect(......, , , setCurrentIndex):

      program go through if statements

      Could you explain what exactly happens?
      Did you try to debug step by step to see what happens?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      B 1 Reply Last reply
      1
      • B buildroot

        Hi everyone,

        just to see how it works, i made the code attached. It is not clear to me, line on the page 71 worked fine but custom slot (setPage) did not work.
        Connect calls the slot, program go through if statements, but i do not see other page of stackedLayout.
        What am i missing?
        Thank you!
        0_1521501632390_Screenshot from 2018-03-20 00-20-03.png

        DiracsbracketD Offline
        DiracsbracketD Offline
        Diracsbracket
        wrote on last edited by Diracsbracket
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • jsulmJ jsulm

          @buildroot said in stackeLayout->setCurrentIndex vs connect(......, , , setCurrentIndex):

          program go through if statements

          Could you explain what exactly happens?
          Did you try to debug step by step to see what happens?

          B Offline
          B Offline
          buildroot
          wrote on last edited by
          #4

          @jsulm sorry for late answer, problem is solved.
          it was because of my missing c++ knowledge.

          aha_1980A 1 Reply Last reply
          1
          • B buildroot

            @jsulm sorry for late answer, problem is solved.
            it was because of my missing c++ knowledge.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @buildroot then please mark this topic as SOLVED. thanks

            Qt has to stay free or it will die.

            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