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. row number is wrong in stackedwidget.

row number is wrong in stackedwidget.

Scheduled Pinned Locked Moved General and Desktop
qtcreator
2 Posts 2 Posters 503 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.
  • darongyiD Offline
    darongyiD Offline
    darongyi
    wrote on last edited by
    #1

    I put listwidget on dialog and put on stacked widget.
    But the problem is QLabel show other row on stacked widget.
    I put my project file on my blog.
    I don't know how can solve this issue.
    I put my project file on blog.

    My blog

    simowS 1 Reply Last reply
    0
    • darongyiD darongyi

      I put listwidget on dialog and put on stacked widget.
      But the problem is QLabel show other row on stacked widget.
      I put my project file on my blog.
      I don't know how can solve this issue.
      I put my project file on blog.

      My blog

      simowS Offline
      simowS Offline
      simow
      wrote on last edited by simow
      #2

      @darongyi Hi, I just downloaded your project and could instantly reproduce your behaviour. Your problem is that you added two empty pages to the stacked widget in the designer – and then – add more widgets in your CreateStackedPage() method.
      This results in:

      • index 0 - empty
      • index 1 - empty
      • index 2 - Homepage
      • ...

      So the homepage with the test label always comes at index 2.

      You may also want to have a look at the QStackedLayout if you just want to switch through the pages from another control like you do with your tab icons.

      Btw: I saw that you archived the whole git repository history. If you like you can create a github repository and I can send you a pull request.

      Let's Try To Negotiate!

      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