PDA

View Full Version : Difference between QWidget and QMainWindow



daviddoria
9th February 2010, 14:10
When making a new form with the QT4 Designer, what is the difference between choosing QWidget and QMainWindow? They both seem to be a blank form that I can add buttons, etc to.

Thanks,
Dave

high_flyer
9th February 2010, 17:12
Is really that hard to read the docs?
QMainWidow vs QWidget.

daviddoria
9th February 2010, 17:17
Is it really that hard to either 1) answer politely or 2) not answer if you are annoyed with the question.

I'll answer your question with another - Is it really that hard to make clear documentation and usable examples?

Is the difference that a MainWindow has a menu/status/toolbar?

bandtank
9th February 2010, 17:25
Is really that hard to read the docs?
QMainWidow vs QWidget.

Is it really that hard to post links correctly?

high_flyer
10th February 2010, 08:36
1. I was polite, AND added the information.
2. There are very few (none that I know of) frameworks/kits with better documentation than Qt, for sure for such questions as whats the difference is between two widgets. Read the documentation of each widget and you will know the difference.
3. The links are indeed broken, due to a typo - so kill me for offering the info.

Comm'on, what do expect as answer to such a question?
The answer is given in the documentation, all you have to do it RTFM!

And you are lashing out for me pointing this out??

What ever.

P.S
have a read through the site guide lines, will save you and other the aggravation with such posts.

aamer4yu
10th February 2010, 09:32
When making a new form with the QT4 Designer, what is the difference between choosing QWidget and QMainWindow? They both seem to be a blank form that I can add buttons, etc to.

Either you didn't phrase your question properly, or as high_flyer said, you didnt read the docs ? If you see the docs, you will notice QMainWindow is inherited from QWidget and on the doc page of QMainWindow you can find the extra functions.
So what exactly more differences you need to know ?

Also problem with asking such questions is that people start posting their homework. And no one wud be interested to do others homework.

bandtank
10th February 2010, 14:54
Either you didn't phrase your question properly, or as high_flyer said, you didnt read the docs ? If you see the docs, you will notice QMainWindow is inherited from QWidget and on the doc page of QMainWindow you can find the extra functions.
So what exactly more differences you need to know ?

Also problem with asking such questions is that people start posting their homework. And no one wud be interested to do others homework.

high_flyer - This is a good example of how to answer a question without being a dick and still get your point across.


Is really that hard to read the docs?


I was polite...

We must live on different planets. Sarcasm is not polite. You obviously understand this since you were offended by the way I pointed out your broken links (the same way you answered the OP).

ShaChris23
9th July 2018, 07:03
When making a new form with the QT4 Designer, what is the difference between choosing QWidget and QMainWindow? They both seem to be a blank form that I can add buttons, etc to.

Thanks,
Dave

For what it's worth, I thought the answer from this StackOverflow's post answered your question quite well: https://stackoverflow.com/a/3302386/65313

Good luck!

Ginsengelf
9th July 2018, 07:22
Did you realize that this thread is eight years old?

Ginsengelf

d_stranz
9th July 2018, 19:06
And so is the StackOverflow post and answer. Sometimes you have to just shake your head and wonder why people bring these old posts back from the grave.