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. My tableView scrollbars wont update when the width changes?
Qt 6.11 is out! See what's new in the release blog

My tableView scrollbars wont update when the width changes?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 898 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.
  • S Offline
    S Offline
    skammers
    wrote on last edited by
    #1

    Hi! I have a tableview where the width is changable. Why wont my scrollbars update when the size of the tableview changes?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      poorBob
      wrote on last edited by
      #2

      Hello,

      do You have Your table placed in the layout?

      Can You post short code example? It would make it easier to figure out what's wrong...

      best wishes,
      poorBob

      1 Reply Last reply
      0
      • S Offline
        S Offline
        skammers
        wrote on last edited by
        #3

        Yes, the tableview is in the layout! This is my code

        @
        TableView{
        id: masterTable;
        height: parent.height;
        width: parent.width;
        TableViewColumn{role: "english"; title: "Text"; width:masterWindow.width;}
        model: masterResource.filteredList;
        itemDelegate: tableItemDelegate;

                                flickableItem.onContentYChanged: {
                                    workTable.flickableItem.contentY = flickableItem.contentY;
                                    keyTable.flickableItem.contentY = flickableItem.contentY;
                                }
                                flickableItem.onContentXChanged: {
                                    workTable.flickableItem.contentX = flickableItem.contentX;
                                    keyTable.flickableItem.contentX = flickableItem.contentX;
                                }
        
                                onFocusChanged: {
                                    if(focus && madeList){
                                        workTableFocus = false;
                                        masterTableFocus = true;
                                        keyTableFocus = false;
                                        workTable.selection.select(currentRow);
                                        keyTable.selection.select(currentRow);
                                    }
        
                                }
        
                                onClicked: {
                                    if(madeList){
                                        selectable = true;
                                        workTableFocus = false;
                                        masterTableFocus = true;
                                        keyTableFocus = false;
                                        setCurrentRow();
                                        workTable.selection.select(currentRow);
                                        keyTable.selection.select(currentRow);
                                    }
                                }
        
        
                                onCurrentRowChanged:{
                                    rowChanged();
                                    setEnglishText();
                                    setEnglish();
                                    workTable.selection.clear();
                                    keyTable.selection.clear();
        
                                    if(selectable){
                                        workTable.selection.select(currentRow);
                                        keyTable.selection.select(currentRow);
                                    }
                               }
                            }
        

        @

        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