Results 1 to 2 of 2

Thread: QToolbar and restoring state

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QToolbar and restoring state

    I'm using the QMainWindow and two toolbars. They are docked at the top. When windows closes, I save it's state. And I restore it on start:

    Qt Code:
    1. restoreState (settings->value("state", QByteArray()).toByteArray());
    To copy to clipboard, switch view to plain text mode 

    This allows me to save/restore toolbars visibility and positions (in a docked state).
    With Qt 4.3 all was fine. But with Qt 4.4 I have a strange behaviour of such restoring. By restoring. the second toolbars always shifts by some pixels right. After several runs, the distance from one toolbar and another is significant. What can I do to prevent this?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QToolbar and restoring state

    Sounds like a bug. Can you reproduce it with a minimal example? How about reporting it to the task-tracker unless similar bug already exists...
    J-P Nurmi

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.