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] Resizing mainwindow will not put in right place listwidget's items!
QtWS25 Last Chance

[SOLVED] Resizing mainwindow will not put in right place listwidget's items!

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

    So if resize the mainwindow the items of a listwidget are not placed as they should..

    If i resize it and then add an item it somehow updates the listwidget and fixes the problem.. so what to do in resizeevent to fix this problem?

    This is not working:

    @void MainWindow::resizeEvent(QResizeEvent *)
    {
    ui->listWidget->repaint();
    }@

    Youtube video of my problem : http://www.youtube.com/watch?v=KlT1qCF_kwg

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sidewinder
      wrote on last edited by
      #2

      Set "resizeMode":http://qt-project.org/doc/qt-4.8/qlistview.html#resizeMode-prop property of QListView class to 'adjust'.

      "Never memorize what you can look up in books."
      Albert Einstein

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Leon
        wrote on last edited by
        #3

        Thanks, it works! :)

        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