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. [solved] QTableView and QLineEdit
QtWS25 Last Chance

[solved] QTableView and QLineEdit

Scheduled Pinned Locked Moved General and Desktop
qtableviewc++qt5.4qlinedit
2 Posts 2 Posters 2.3k 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.
  • S Offline
    S Offline
    sigsevg
    wrote on last edited by sigsevg
    #1

    Hi,
    I'd like to put QLineEdit above QTableView and adhere to QTableView's columns. When I resize column or table every line edit should have the same width with coulumn below. How can i do this ?

    alt text

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      HI and welcome to devnet,

      you can connect a slot to the QHeaderView::sectionResized() signal to be notified when a column is resized

      connect(tableView->horizontalHeader(), &QHeaderView::sectionResized, 
                     this, &MyWIdget::slotColumnResized);
      

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved