QMenuBar question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • me

    QMenuBar question

    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::Lut Creator(QWidget *parent, const char *name) :
    BaseDlg(parent, name)
    {


    m_fileMenu = new QPopupMenu;
    m_LUTmenu = new QPopupMenu;
    m_menuBar = new QMenuBar(this);
    m_LUTmenu->insertItem("Lu t");
    m_menuBar->insertItem("Fi le",m_fileMenu) ;
    m_fileMenu->insertItem("Lo ad Lut");
    m_fileMenu->insertItem("Sa ve Lut");
    m_menuBar->insertItem("LU T",m_LUTmenu );
    [snip]
    }
  • Ashish

    #2
    Re: QMenuBar question


    "me" <dkls@hotmail.c om> wrote in message
    news:9d9b1b25.0 306270353.3686a 64c@posting.goo gle.com...[color=blue]
    > 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...[/color]
    ....

    WTF are QMenuBar widget?


    --
    -Ashish
    --------------------------------------------------------------------------
    Hi! I'm a shareware signature! Send $5 if you use me, send $10 for manual!
    http://www.123ashish.com http://www.softwarefreaks.com


    Comment

    • Asle Frantzen

      #3
      Re: QMenuBar question

      Ashish wrote:[color=blue]
      > WTF are QMenuBar widget?[/color]

      Hmm, haven't anyone here heard about the Qt-library?

      Take a look at this brochure, which compares the amount
      of coding when using Motif, Qt and MFC:




      Here's the class-list for the latest (?) version:



      ..a


      Comment

      • Ashish

        #4
        Re: QMenuBar question


        "Asle Frantzen" <asle@cocacolik er.com> wrote in message
        news:Mn%Ka.9503 $Hb.165179@news 4.e.nsc.no...[color=blue]
        > Ashish wrote:[color=green]
        > > WTF are QMenuBar widget?[/color]
        >
        > Hmm, haven't anyone here heard about the Qt-library?
        >[/color]

        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)


        --
        -Ashish
        --------------------------------------------------------------------------
        Hi! I'm a shareware signature! Send $5 if you use me, send $10 for manual!
        http://www.123ashish.com http://www.softwarefreaks.com


        Comment

        • Asle Frantzen

          #5
          Re: QMenuBar question

          Ashish wrote:[color=blue]
          > 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)[/color]

          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


          Comment

          • Thomas Matthews

            #6
            Re: QMenuBar question

            Asle Frantzen wrote:[color=blue]
            > Ashish wrote:
            >[color=green]
            >>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)[/color]
            >
            >
            > 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
            >
            >[/color]

            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:

            C++ Faq: http://www.parashift.com/c++-faq-lite
            C Faq: http://www.eskimo.com/~scs/c-faq/top.html
            alt.comp.lang.l earn.c-c++ faq:

            Other sites:
            http://www.josuttis.com -- C++ STL Library book

            Comment

            • Jim Fischer

              #7
              Re: QMenuBar question

              Asle Frantzen wrote:[color=blue]
              > Ashish wrote:
              >[color=green]
              >>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)[/color]
              >
              >
              > 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...)[/color]

              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

              trolltech.com is for sale on Above.com Marketplace.


              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.

              --
              Jim

              To reply by email, remove "link" and change "now.here" to "yahoo"
              jfischer_link58 09{at}now.here. com


              Comment

              • Filipe Sousa

                #8
                Re: QMenuBar question

                Jim Fischer wrote:
                [color=blue]
                > Asle Frantzen wrote:[color=green]
                >> Ashish wrote:
                >>[color=darkred]
                >>>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)[/color]
                >>
                >>
                >> 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...)[/color]
                >
                > There are no Qt newsgroups -- at least, none that I know of -- but there[/color]

                nntp.trolltech. com :) but I think is read only
                [color=blue]
                > 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.
                >[/color]

                Comment

                • Russell Hanneken

                  #9
                  Re: QMenuBar question

                  "Filipe Sousa" <filipe.gr.sous a@alunos.ipb.pt > wrote in message
                  news:1057169920 .558092@jubilee .esoterica.pt.. .[color=blue]
                  > Jim Fischer wrote:[color=green]
                  > > There are no Qt newsgroups -- at least, none that I know of[/color]
                  >
                  > nntp.trolltech. com :) but I think is read only[/color]

                  You can post if you register a username and password:



                  --
                  Russell Hanneken
                  rhanneken@pobox .com


                  Comment

                  • me

                    #10
                    Re: QMenuBar question

                    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.

                    Thomas Matthews <thomas_matthew s@sbcglobal.net > wrote in message news:<3EFC9D1E. 3090906@sbcglob al.net>...[color=blue]
                    > Asle Frantzen wrote:[color=green]
                    > > Ashish wrote:
                    > >[color=darkred]
                    > >>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)[/color]
                    > >
                    > >
                    > > 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
                    > >
                    > >[/color]
                    >
                    > 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.l earn.c-c++ faq:
                    > http://www.raos.demon.uk/acllc-c++/faq.html
                    > Other sites:
                    > http://www.josuttis.com -- C++ STL Library book[/color]

                    Comment

                    Working...