Join Today
+ Reply to Thread
Results 1 to 7 of 7
  1. #1

    Default Properly declaring QMessageBox?

    I have no idea what I'm doing wrong here.

    I am working on compiling a SIP Phone based in QT called KPhone/PI (http://www.pi-sync.net/html/projects.html), and the application includes qmessagebox.h.

    This isn't so much of a problem, however for some odd reason it keeps complaining that QMessageBox is not declared:

    Code:
    /Users/numbski/ezx-crosstool-0.5/gcc-arm-iwmmxt/gcc-3.3.6-glibc-2.3.2/arm-linux/bin/arm-linux-g++ -DQT_QWS_IPAQ -c -pipe  -DQWS -fno-exceptions -fno-rtti   -O2  -DDESKTOP_VERSION -DQT_NO_DEBUG -I/Users/numbski/dev-ezx-0.2.0/qt/mkspecs/qws/linux-ipaq-g++ -I. -I. -Idissipate2 -Igsm -Iilbc -Ikphone -I/Users/numbski/dev-ezx-0.2.0/qt/include -I/Users/numbski/dev-ezx-0.2.0/include -I/Users/numbski/dev-ezx-0.2.0/openssl-0.9.8b/include -Imoc/unix/ -o obj/unix/sipregister.o dissipate2/sipregister.cpp
    dissipate2/sipregister.cpp: In member function `void 
       SipRegister::localStatusUpdated()':
    dissipate2/sipregister.cpp:165: error: `QMessageBox' undeclared (first use this 
       function)
    dissipate2/sipregister.cpp:165: error: (Each undeclared identifier is reported 
       only once for each function it appears in.)
    dissipate2/sipregister.cpp:165: error: syntax error before `(' token
    dissipate2/sipregister.cpp:169: error: `mb' undeclared (first use this 
       function)
    make: *** [obj/unix/sipregister.o] Error 1
    It's bizarre. I can't figure out what I'm doing wrong with this. I went though the qt docs and examples trying to find how to correct it. Here's the offending section of code:

    Code:
                    } else if( curtrans->getStatus().getCode() >= 400 ) {
                            QMessageBox mb( "KPhone", 
                                    "Registration Failed: " + SipStatus::codeString( curtrans->g$                                QMessageBox::Information,
                                    QMessageBox::Ok | QMessageBox::Default,0 ,0 );
                            mb.exec();
                            rstate = NotConnected;
    I just can't fathom how to properly declare this. I tried changing it to mb= new QMessageBox ..., however then it complains that mb is not declared. If I state int mb, then it says mb.exec isn't possible because mb is int. Grrr....

    I just don't do c/c++. Help?

  2. #2
    Join Date
    Feb 2005
    Location
    toronto, canada
    Posts
    424

    Default Re: Properly declaring QMessageBox?

    edit - removed my useless advice as the experts are here

    good luck with the remainder of your programming

  3. #3
    Join Date
    Sep 2005
    Location
    Jakarta, Indonesia
    Posts
    1,091

    Default Re: Properly declaring QMessageBox?

    It's because qmessagebox not included in ezx qt-2.3.6. You need to use zmessagebox instead qmessagebox. Read config.h in ezx qt-2.3.6 include directory to know what component not included.
    eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6

  4. #4

    Default Re: Properly declaring QMessageBox?

    That would explain it. I'm not writing this program, simply porting it. Odd that qmessagebox.h is in the qt/include directory if qmessagebox is not available. Odd.

    Code:
    chibi:~/dev-ezx-0.2.0/kphone_pi numbski$ ls /Users/numbski/dev-ezx-0.2.0/qt/include/
    jri.h                           qmovie.h
    jritypes.h                      qmsgbox.h
    npapi.h                         qmultilinedit.h
    npupp.h                         qmultilineedit.h
    q1xcompatibility.h              qnamespace.h
    qabstractlayout.h               qnetwork.h
    qaccel.h                        qnetworkprotocol.h
    qaction.h                       qnp.h
    qapp.h                          qobjcoll.h
    qapplication.h                  qobjdefs.h
    qarray.h                        qobject.h
    qasciicache.h                   qobjectdefs.h
    qasciidict.h                    qobjectdict.h
    qasyncimageio.h                 qobjectlist.h
    qasyncio.h                      qpaintd.h
    qbig5codec.h                    qpaintdc.h
    qbitarray.h                     qpaintdevice.h
    qbitarry.h                      qpaintdevicedefs.h
    qbitmap.h                       qpaintdevicemetrics.h
    qbrush.h                        qpainter.h
    qbttngrp.h                      qpalette.h
    qbuffer.h                       qpdevmet.h
    qbutton.h                       qpen.h
    qbuttongroup.h                  qpicture.h
    qcache.h                        qpixmap.h
    qcanvas.h                       qpixmapcache.h
    qcdestyle.h                     qplatinumstyle.h
    qcheckbox.h                     qpmcache.h
    qchkbox.h                       qpngio.h
    qclipboard.h                    qpntarry.h
    qclipbrd.h                      qpoint.h
    qcollect.h                      qpointarray.h
    qcollection.h                   qpolygonscanner.h
    qcolor.h                        qpopmenu.h
    qcolordialog.h                  qpopupmenu.h
    qcombo.h                        qprintdialog.h
    qcombobox.h                     qprinter.h
    qcommonstyle.h                  qprndlg.h
    qcompactstyle.h                 qprogbar.h
    qconfig-cygwin.h                qprogdlg.h
    qconfig-dist.h                  qprogressbar.h
    qconfig-ezx.h                   qprogressdialog.h
    qconfig-large.h                 qpsprn.h
    qconfig-medium.h                qptrdict.h
    qconfig-minimal.h               qpushbt.h
    qconfig-small.h                 qpushbutton.h
    qconfig.h                       qqueue.h
    qconnect.h                      qradiobt.h
    qconnection.h                   qradiobutton.h
    qcopchannel_qws.h               qrangecontrol.h
    qcstring.h                      qrangect.h
    qcursor.h                       qrect.h
    qdatastream.h                   qregexp.h
    qdatetime.h                     qregion.h
    qdatetm.h                       qrtlcodec.h
    qdial.h                         qscrbar.h
    qdialog.h                       qscrollbar.h
    qdict.h                         qscrollview.h
    qdir.h                          qsemimodal.h
    qdirectpainter_qws.h            qserversocket.h
    qdns.h                          qsession.h
    qdom.h                          qsessionmanager.h
    qdragobject.h                   qsgistyle.h
    qdrawutil.h                     qshared.h
    qdrawutl.h                      qsharedmemory.h
    qdropsite.h                     qsignal.h
    qdstream.h                      qsignalmapper.h
    qeucjpcodec.h                   qsignalslotimp.h
    qeuckrcodec.h                   qsimplerichtext.h
    qevent.h                        qsize.h
    qfeatures.h                     qsizegrip.h
    qfile.h                         qsizepolicy.h
    qfiledef.h                      qsjiscodec.h
    qfiledialog.h                   qslider.h
    qfiledlg.h                      qsmartptr.h
    qfileinf.h                      qsocket.h
    qfileinfo.h                     qsocketdevice.h
    qfocusdata.h                    qsocketnotifier.h
    qfont.h                         qsocknot.h
    qfontdatabase.h                 qsortedlist.h
    qfontdialog.h                   qsound.h
    qfontdta.h                      qsoundqss_qws.h
    qfontfactorybdf_qws.h           qspinbox.h
    qfontfactoryttf_qws.h           qsplitter.h
    qfontinf.h                      qstack.h
    qfontinfo.h                     qstatusbar.h
    qfontmanager_qws.h              qstring.h
    qfontmet.h                      qstringlist.h
    qfontmetrics.h                  qstrlist.h
    qframe.h                        qstrvec.h
    qftp.h                          qstyle.h
    qgarray.h                       qstylesheet.h
    qgbkcodec.h                     qt.h
    qgcache.h                       qtabbar.h
    qgdict.h                        qtabdialog.h
    qgeneric.h                      qtabdlg.h
    qgfx_qws.h                      qtable.h
    qgfxlinuxfb_qws.h               qtableview.h
    qgfxmach64defs_qws.h            qtablevw.h
    qgfxmatroxdefs_qws.h            qtabwidget.h
    qgfxraster_qws.h                qtextbrowser.h
    qgfxvnc_qws.h                   qtextcodec.h
    qgfxvoodoodefs_qws.h            qtextstream.h
    qgif.h                          qtextview.h
    qgl.h                           qthread.h
    qglist.h                        qtimer.h
    qglobal.h                       qtl.h
    qgrid.h                         qtoolbar.h
    qgroupbox.h                     qtoolbutton.h
    qgrpbox.h                       qtooltip.h
    qguardedptr.h                   qtranslator.h
    qgvector.h                      qtsciicodec.h
    qhbox.h                         qtstream.h
    qhbuttongroup.h                 qurl.h
    qheader.h                       qurlinfo.h
    qhgroupbox.h                    qurloperator.h
    qhostaddress.h                  qutfcodec.h
    qiconset.h                      qvalidator.h
    qiconview.h                     qvaluelist.h
    qimage.h                        qvaluestack.h
    qinputdialog.h                  qvariant.h
    qintcach.h                      qvbox.h
    qintcache.h                     qvbuttongroup.h
    qintdict.h                      qvector.h
    qinterlacestyle.h               qvfbhdr.h
    qiodev.h                        qvgroupbox.h
    qiodevice.h                     qwhatsthis.h
    qjiscodec.h                     qwidcoll.h
    qjpegio.h                       qwidget.h
    qjpunicode.h                    qwidgetintdict.h
    qkeyboard_qws.h                 qwidgetlist.h
    qkeycode.h                      qwidgetstack.h
    qkoi8codec.h                    qwindefs.h
    qlabel.h                        qwindow.h
    qlayout.h                       qwindowdefs.h
    qlcdnum.h                       qwindowsstyle.h
    qlcdnumber.h                    qwindowsystem_qws.h
    qlined.h                        qwizard.h
    qlineedit.h                     qwmatrix.h
    qlist.h                         qworkspace.h
    qlistbox.h                      qwsbeosdecoration_qws.h
    qlistview.h                     qwscommand_qws.h
    qlocalfs.h                      qwscursor_qws.h
    qlock_qws.h                     qwsdecoration_qws.h
    qmainwindow.h                   qwsdefaultdecoration_qws.h
    qmap.h                          qwsdisplay_qws.h
    qmemorymanager_qws.h            qwsevent_qws.h
    qmenubar.h                      qwshydrodecoration_qws.h
    qmenudata.h                     qwskde2decoration_qws.h
    qmenudta.h                      qwskdedecoration_qws.h
    qmessagebox.h                   qwsmanager_qws.h
    qmetaobj.h                      qwsmouse_qws.h
    qmetaobject.h                   qwsproperty_qws.h
    qmime.h                         qwsregionmanager_qws.h
    qmlined.h                       qwssocket_qws.h
    qmngio.h                        qwsutils_qws.h
    qmodules.h                      qwswindowsdecoration_qws.h
    qmotifplusstyle.h               qxml.h
    qmotifstyle.h

  5. #5
    Join Date
    Sep 2005
    Location
    Jakarta, Indonesia
    Posts
    1,091

    Default Re: Properly declaring QMessageBox?

    qmessagebox.h included but qmessagebox widget not built in ezx libqt-mt.so by default. I mean in qconfig.h you can get what component not included by ezx programmers. Another widgets I know not built in ezx are qtabwidget, qtabbar, qspinbox, qlcdnumber, qfiledialog, ... If you need these widget you need to hard coding it in your app, look at ekonsole source I have shared in this forum.
    eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6

  6. #6

    Default Re: Properly declaring QMessageBox?

    Quote Originally Posted by blackhawk
    qmessagebox.h included but qmessagebox widget not built in ezx libqt-mt.so by default. I mean in qconfig.h you can get what component not included by ezx programmers. Another widgets I know not built in ezx are qtabwidget, qtabbar, qspinbox, qlcdnumber, qfiledialog, ... If you need these widget you need to hard coding it in your app, look at ekonsole source I have shared in this forum.
    Interesting... I thought these widgets weren't included cause they aren't supported by the phone itself, like they won't show or something? Does this mean that if I want tabs I can actually use them?

  7. #7

    Default Re: Properly declaring QMessageBox?

    What blackhawk says makes sense. Just because it isn't on the library on the phone doesn't mean you can't code it into another library and put it there, or as he says "hard code" it (statically compile it as part of the binary itself?).

    I'm just wanting to get a quick and dirty compile to work, so for that I might as well change that to a zmessagebox just to get it going. I can look at getting widgets that aren't included working later. I have similar problems with all of the qt apps I've tried, noteably qtextedit is missing in almost every case.

    I'd like to see an example of this in action. Do you have a specific code sample?


 
+ Reply to Thread

Similar Threads

  1. Touchscreen not working properly
    By vivek_033 in forum E6 General Chat
    Replies: 42
    Last Post: 10-14-2010, 02:59 PM
  2. Q: What fonts work properly?
    By Casper in forum A1200 General Chat
    Replies: 7
    Last Post: 06-26-2008, 11:18 PM
  3. Camera not working properly
    By Hellodelhi in forum E6 General Chat
    Replies: 2
    Last Post: 02-22-2008, 07:04 AM
  4. Help: Touchscreen not working properly.
    By mtech in forum A1200 General Chat
    Replies: 19
    Last Post: 09-03-2007, 09:26 PM
  5. when this site willwork properly
    By jafery in forum Comments/Suggestions
    Replies: 0
    Last Post: 11-23-2006, 07:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1