Results 1 to 4 of 4

Thread: QTableView: strange behavior on a window maximization. How to fix that?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Location
    Russia, Tatarstan, Naberezhnye Chelny
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QTableView: strange behavior on a window maximization. How to fix that?

    Hello all.

    Seems like a bug...

    in constructor:
    Qt Code:
    1. ui->tableView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
    2. ui->tableView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
    3. ui->tableView->resizeColumnsToContents();
    4. ui->tableView->resizeRowsToContents();
    5.  
    6. connect(ui->tableView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)),
    7. ui->tableView, SLOT(resizeRowsToContents()));
    To copy to clipboard, switch view to plain text mode 

    It's ok with that if you minimize the window/restore the state of the window.
    But when window is maximizing QTableView's row heights stay unaffected by event. Just ignore maximization...
    One strange thing: after maximization, row heights seem like resized for a normal window state. After returning from maximized state to normal, row heights seem like resized for a maximized window state, i.e. in other words resizing is looks like working with a latency equally to the previous window state. Seems like row height's resizing happens for the old WindowState, just before window became into the new state.
    Just one window's minimization repairs the situation but, till another maximization...
    Any workaround?
    Thanks.

    ---
    Qt 4.6.2
    WinXP SP2 Rus
    Qt SDK 2010.01
    Last edited by sarbash; 25th June 2010 at 14:11.

Similar Threads

  1. Strange behavior of QSqlTableModel
    By venomj in forum Qt Programming
    Replies: 0
    Last Post: 13th January 2010, 03:29
  2. QComboBox strange behavior
    By Antebios in forum Newbie
    Replies: 2
    Last Post: 31st March 2009, 23:50
  3. Strange behavior of QSyntaxHighlighter in Qt3
    By lorebett in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2009, 14:50
  4. Strange resize behavior
    By Lykurg in forum Newbie
    Replies: 3
    Last Post: 9th January 2007, 13:56
  5. scrollbars strange behavior
    By siniy in forum Qt Programming
    Replies: 6
    Last Post: 29th December 2006, 10:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.