Results 1 to 5 of 5

Thread: QScrollbar has no geometry

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2015
    Posts
    67

    Default QScrollbar has no geometry

    QScrollArea *scrollArea = new QScrollArea();
    qDebug() << scrollArea->verticalScrollBar()->geometry();

    output:
    QRect(0,0 100x30)

    I debugged this at the end of mainwindow constructor where the widget with this scrollarea and scrollbar inside is already shown. So why it does not have the right geometry?
    The QRect data is clearly wrong.

    Must be a bug right?
    Or does the scrollbar depend on OS and Qt has no data about it and debugs sizehint or something?

    edit: seems like nothing is working for these returned QScrollbars of the function, even isVisible() returns always false.
    Last edited by Ini; 29th January 2016 at 18:48.

Similar Threads

  1. Geometry of QWebElement
    By TeeT in forum Newbie
    Replies: 4
    Last Post: 17th April 2015, 15:48
  2. QPlainTextEdit and geometry
    By tuli in forum Qt Programming
    Replies: 2
    Last Post: 12th August 2014, 13:42
  3. frameGeometry vs Geometry
    By bossy in forum Newbie
    Replies: 4
    Last Post: 18th October 2013, 00:55
  4. Geometry shader with QT4.7
    By saraksh in forum General Programming
    Replies: 3
    Last Post: 28th March 2011, 16:40
  5. QGraphicsLayout::geometry()
    By isutruk in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2009, 15:43

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.