Results 1 to 2 of 2

Thread: QScrollArea layout is correct with debug message. Remove debugging results in error.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    May 2019
    Posts
    11
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QScrollArea layout is correct with debug message. Remove debugging results in err

    The setting of the minimum and maximum is where the problem is.
    Qt Code:
    1. // QMessageBox::information(0,"Min/Max",QString("Min: %1, Max: %2").arg(min).arg(max));
    2. qApp->processEvents();
    3. ui_scrollArea->verticalScrollBar()->setMinimum(min);
    4. ui_scrollArea->verticalScrollBar()->setMaximum(max);
    5. // ui_scrollArea->verticalScrollBar()->setSliderPosition(min);
    6. ui_scrollArea->verticalScrollBar()->setValue(min);
    7. qApp->processEvents();
    To copy to clipboard, switch view to plain text mode 
    Either the code is being ignored or there is something overwriting these values after I assign the calculated values. I created a non-elegant fix by saving off the min and max values to member variables and setting their values again in SlotUserPositionChanged. There should be a better way - any suggestions are welcome.
    Should I be using setValue or setSliderPosition? The documentation says there is a difference with tracking, but I don't know what is meant by tracking.
    Last edited by Debra; 13th June 2019 at 17:57.

Similar Threads

  1. Replies: 5
    Last Post: 27th June 2013, 14:22
  2. Replies: 6
    Last Post: 13th February 2011, 23:06
  3. Replies: 5
    Last Post: 19th March 2010, 18:13
  4. Replies: 0
    Last Post: 25th May 2009, 10:00
  5. what does these debug message mean?
    By wesley in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th February 2008, 07:56

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.