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 6226063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:57:27+00:00 2026-05-24T08:57:27+00:00

I have a *.ui definition I’m loading and running. A certain sub-widget there has

  • 0

I have a *.ui definition I’m loading and running. A certain sub-widget there has the rectangle of (x=0,y=88,w=400,h=200). When I instantiate the QWidget class based on the *.ui, and show() it, everything is fine.

I need to be able to get this rectangle BEFORE I show the widget.

When I just instantiate the class, the geometry object always returns (0,0,100,30). Only after I “show()” the widget, I’ll get the correct geometry. I may be able to use the sizeHint for this sub-widget, but what about the “hint-X” or “hint-Y”? how do I get to my (x=0,y=88,w=400,h=200) BEFORE showing the widget? This is critical for one of my applications (this is a 3rd party component requirement, it cannot change).

  • 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-05-24T08:57:28+00:00Added an answer on May 24, 2026 at 8:57 am

    The resize event will tell you what you need to know but there are a number of different ways to intercept it, depending on your situation.

    If you are dealing with a QWidget subclass of your own, you can override resizeEvent(). If not, you can install an event filter on the object.

    There are a couple of other options that are variations of these. The important parts of the documentation are The Event System and QCoreApplication::notify

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

Sidebar

Related Questions

Is there something simiar? I have this definition create table xyz ( fecha_alta timestamp
I have a definition like this def bar(self, foo=None, bar=None, baz=None): pass I want
Lets say you have interface definition. That interface can be Operation . Then you
In the database, I have a definition table that is read from the application
Is it possible to define a spring-managed EJB3 hibernate listener? I have this definition
I have this working definition: IDENTIFIER [a-zA-Z][a-zA-Z0-9]* I don't want to keep repeating the
I have a function definition in my VC++ Win32 DLL DEMO2_API void ProcessData(char* i_buff,
I have a typical definition/instance situation in my data modeling. I'm trying to store
I have a macro definition in header file like this: // header.h ARRAY_SZ(a) =
Say I have a class definition: class CustomClass { int member; }; Why is

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.