Any alternative to TableWidget if i want to display a grid?



  • Hi, I currently have a table widget and it works fine. But it gets a little laggish and slow when i have 2-3 table widgets overlaying each other.
    What i need is a square grid which is clickable/selectable. For example, if i a vehicle is moving, i am able to plot on my grid the path its taken, by highlighting the grids. Right now i am using a table widget and using the select cells to highlight the grids, is there any existing widget or a more efficient way i can do this?
    Any advice or input would be greatly appreciated! =]


  • Moderators

    Seems to me that what you are looking for is a chart widget, not a grid. Take a look at Qwt library, it has great charting widgets.

    As for something faster than QTableWidget: there is QTableView which will allow you to have better control over things and thus speed things up.



  • @sierdzio
    Hmm.. I briefly looked through the chart widget examples online, i don't see anything like what i want actually, or maybe i just didnt manage to find it.

    What i need to be able to do:

    • Background is a map.
    • I need a grid/table like box/region which i'll be able to highlight to show the position of my vehicle.
    • As my vehicle travels, the coordinates will be updated and plotted on the map.
    • When the vehicle travels out of the current box/region into the another box/region, that new box/region will also be highlighted, thus showing a path of highlighted box.

    I need the box as the box as the area is divided into regions, and i'll be able to tell people my location by providing which box i am in, instead of just drawing a line(path)on the map.

    Right now i have a table widget overlaying my map, and when the coordinates of the vehicle is coming in at a certain rate like say 800msec, there will be moments where (it seems to be lag) a particular point isn't plotted on the map. But when i take away the table widget(i have a toggle button to turn it on n off), it plots smoothly.

    Is there anything else i can use? Or has anyone done anything similar?

    Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.