Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:34:56+00:00 2026-06-18T02:34:56+00:00

Although Qt’s docs indicate that these two functions are different (the first doesn’t include

  • 0

Although Qt’s docs indicate that these two functions are different (the first doesn’t include the frame) no matter what widget I choose – including the main window of my application – someWidget->frameGeometry().height() always returns the same value as someWidget->geometry.height().

What am I missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:34:57+00:00Added an answer on June 18, 2026 at 2:34 am

    I think, you don’t give enough time to widget to be painted. There is little example:

    #include <QApplication>
    #include <QMainWindow>
    #include <QDebug>
    
    class MainWindow : public QMainWindow
    {
    public:
        MainWindow() {
            startTimer(500);
        }
    
        void timerEvent(QTimerEvent *e) {
            // Here values are different
            qDebug() << geometry().height() << frameGeometry().height();
        }
    };
    
    int main(int argc, char *argv[])
    {
        QApplication app(argc, argv);
    
        MainWindow mainWin;
        mainWin.show();
    
        // Here values are equals
        qDebug() << mainWin.geometry().height() << mainWin.frameGeometry().height();
    
        return app.exec();
    }
    

    First debug output will produce the same values for geometry and frameGeometry, but the second (in timerEvent) will produce different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Although I know that there are more idomatic ways of doing this, why doesn't
Although appengine already is schema-less, there still need to define the entities that needed
Although I am not new to Python, this is my first attempt at using
Although including <signal.h> I get an error saying that struct sigaction is an incomplete
Although this question is asked before, my problem is little different. I have a
Although I should really know this, I am afraid that I don't get it
Although the following code works correctly using Chrome (shows a popup that requests permission
Although I get it that $a = new b() would be initializing an object
Although I know that I can use &quote , I was wondering if there
Although ASP.NET MVC seems to have all the hype these days, WebForms are still

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.