QMenuBar question

M

me

Hi,

I trying to add a menu bar to my main widget.
The reslut is, that the menus (like file menu) apear and work ok, but
the menubar it self is not being refreshed at all.
I looked at all the documantation I could find, and I cant find what I
am doing wrong...
When my main widget first apears, the area of the menu bar will be
full with what ever is behind the main widget at creation time
(meaning it had no paint event), and will not refresh.
The menus, are responding and visible as expected.
The code below is only the code needed for the display of hte menu bar
and menus that are in it with out the slot connections...)
Can you guys have clue?

Thanks

LutCreator::LutCreator(QWidget *parent, const char *name) :
BaseDlg(parent, name)
{


m_fileMenu = new QPopupMenu;
m_LUTmenu = new QPopupMenu;
m_menuBar = new QMenuBar(this);
m_LUTmenu->insertItem("Lut");
m_menuBar->insertItem("File",m_fileMenu);
m_fileMenu->insertItem("Load Lut");
m_fileMenu->insertItem("Save Lut");
m_menuBar->insertItem("LUT",m_LUTmenu);
[snip]
}
 
A

Ashish

me said:
Hi,

I trying to add a menu bar to my main widget.
The reslut is, that the menus (like file menu) apear and work ok, but
the menubar it self is not being refreshed at all.
I looked at all the documantation I could find, and I cant find what I
am doing wrong...
....

WTF are QMenuBar widget?
 
A

Ashish

Asle Frantzen said:
Hmm, haven't anyone here heard about the Qt-library?

It is still off-topic. Just because its open source, Linux or whatever
doesnt make it a part of the standard C++. The OP should be redirected to an
appropriate newsgroup rather than answering his questions here. (I am sorry
I didnt redirect him in the first place, I am too lazy)
 
A

Asle Frantzen

Ashish said:
It is still off-topic. Just because its open source, Linux or whatever
doesnt make it a part of the standard C++. The OP should be
redirected to an appropriate newsgroup rather than answering his
questions here. (I am sorry I didnt redirect him in the first place,
I am too lazy)

That might be. And please let me know if you know of some
other newsgroup that discusses the use of Qt in C++, because
I haven't found any yet :(

(Btw it has nothing to do with linux, just because KDE afaik
has been created with it, it's platform-independent...)


..a
 
T

Thomas Matthews

Asle said:
That might be. And please let me know if you know of some
other newsgroup that discusses the use of Qt in C++, because
I haven't found any yet :(

(Btw it has nothing to do with linux, just because KDE afaik
has been created with it, it's platform-independent...)


.a

Sorry, but you are wrong. Just because something is compiled on
two platforms doesn't make it platform independent.

Let us examine a tape drive system. The tape drive system doesn't
have any screen or video connected to it. Yet it can still
support the C++ language. I've worked on systems that did.
However, it won't support Qt since it doesn't have a display.

Let us look at laser printers. Laser printers don't have video
screens (at least the cheaper ones). Those laser printers can
support standard C++. What good is supporting a Windowing
U/I when there is no device for displaying the information?

Just to let you know, Workstations and PCs are not the only
platforms in existance. Not all platforms have video displays.

Search the C++ and C newsgroups for my rants on this issue.
I believe also that Shiva has it in the Welcome.txt listed below.
--
Thomas Matthews
Embedded Systems Software Engineer

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
J

Jim Fischer

Asle said:
That might be. And please let me know if you know of some
other newsgroup that discusses the use of Qt in C++, because
I haven't found any yet :(

(Btw it has nothing to do with linux, just because KDE afaik
has been created with it, it's platform-independent...)

There are no Qt newsgroups -- at least, none that I know of -- but there
are Qt mailing lists. IOW, you email your question to other people who
also subscribe to the mailing list, and then hope that someone responds
to your email. For more info, visit the Qt web site

http://www.trolltech.com/

click on the "Developer" link, click on the "Mailing Lists" link, and
then read up on the various mailing lists to learn which list(s) are
appropriate for your needs.
 
M

me

Before everything, I jsut would like to thank everyone who answered.
I am sorry this post is off topic, but as siad here, I couldnt find
any specific newsgroups that dealt with QT, and since I have seen some
QT questions in this group, I thought it was Ok, so sorry about that.

However Thomas, from the way you wrote about QT, it seams to me you
know nothing about it, yet you alow your self to make very wide
asumptions on it.
My sugestion - and this is in a friedly tone, dont talk about things
you dont know anything about.
The examples you gave about the drive system or others that dont use
displays - and THATS why they will not supports QT is absolute
nonsense.
Qt is just a warpper, and as far as I know, it self, IS in standard
C++.
It is true, that some QT mechanisms are not C++ like signals and
slots, but their implementation is very much C++.
I dont understand exactly what do you mean when you say that a device
"supports c++"...
No device supports a specific higher language, only machine code.
C++ is human language - not machine language.
It might be that a device will work with only a sertain
compiler-linker, that knows exactly the code "foramt" for that device,
and then the language is compiler specific - maybe you meant that.
In principal, there should be no reason to stop you from writting
drivers or any other sort of code for any device, be it using QT MFC
or any other library or language... with or without display as I have
done more then one time.

All the best

Mikledet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top