Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TableView rightclick
Qt 6.11 is out! See what's new in the release blog

TableView rightclick

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 836 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.
  • M Offline
    M Offline
    MTOLANI
    wrote on last edited by
    #1

    Hi,

    I have a tableView which i want to show a menubar on rightclick when its empty (no data).
    I tried doing that but while calling insertion of row, am I supposed to give a hardcoded index? styledata.row is accessible only inside delegates. Is there anything which i can use as the row count in tableview?

    raven-worxR 1 Reply Last reply
    0
    • M MTOLANI

      Hi,

      I have a tableView which i want to show a menubar on rightclick when its empty (no data).
      I tried doing that but while calling insertion of row, am I supposed to give a hardcoded index? styledata.row is accessible only inside delegates. Is there anything which i can use as the row count in tableview?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @MTOLANI said in TableView rightclick:

      I have a tableView which i want to show a menubar on rightclick when its empty (no data).

      where should the index come from when there is no data in your table?!

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MTOLANI
        wrote on last edited by
        #3

        Hey,

        I was trying to create a new row in tableview, when there is no data.
        The tableview is editable.

        I did this by hardcoding the index value, since it will be the first row anyway when I insert it for the first time.

        Thanks

        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