Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: no error???? why???

  1. #1
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Question no error???? why???

    i m using Qt4.2.2 evaluation version.
    following are my files in a project
    in 7th line of form.cpp i m calling ui.disp() and
    on line no. 13 in function disp() i m calling QmessageBox..
    my ques is that why its not giving error during compile.
    i m using nmake1.5 n winXP n Visual studio C++ 6.0.
    plz suggest me better programming in my given code..

    can any1 help me to draw a line or anything on the central widget when i click a menu item?
    thanks in advance
    Attached Files Attached Files
    Last edited by Shuchi Agrawal; 11th January 2007 at 10:13.

  2. #2
    Join Date
    Feb 2006
    Location
    Kirovohrad, Ukraine
    Posts
    72
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: no error???? why???

    Try
    Qt Code:
    1. connect(ui.pushButton, SIGNAL(clicked()), this, SLOT(disp()));
    To copy to clipboard, switch view to plain text mode 
    Note, that you should mention slot's name and parameters, but not the object instance.

    WBR, Cesar

  3. #3
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: no error???? why???

    thanks Cesar but i m able to do it correctly.so my ques was that why the given code does not give error as there is no slot in Ui::MainWindow and when QmessageBox class has not been included, still its not showing error. why??????

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: no error???? why???

    Signal slot connections are established at run time. You won't get compilation errors if you misspell something in the connect statement (unless the typo is so bad that it doesn't pass syntactically). The connect statement returns false if the connection fails (and in this case it does print information on the debug output):
    Object::connect: No such slot MainWindow::ui.disp()
    Object::connect: (sender name: 'pushButton')
    Object::connect: (receiver name: 'MainWindow')
    You are including the whole QtGui module which leads to including QMessageBox as well.
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    Shuchi Agrawal (11th January 2007)

  6. #5
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: no error???? why???

    thanks a lot jpn but i cud not understand tht how u got the 3 lines or error u have given in ur reply.
    plz explain then how can i know the logaical error like the one i did in my code in slot.
    and can u tel me the way to draw line n all on central widget and activate context menu(floating menu)

  7. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: no error???? why???

    Quote Originally Posted by Shuchi Agrawal View Post
    thanks a lot jpn but i cud not understand tht how u got the 3 lines or error u have given in ur reply.
    plz explain then how can i know the logaical error like the one i did in my code in slot.
    Are you running the program in Visual Studio? It should appear in the debug output window.
    Quote Originally Posted by Shuchi Agrawal View Post
    and can u tel me the way to draw line n all on central widget and
    Override QWidget::paintEvent() for the widget you want to paint on and use QPainter to draw the line. For example, if you want to paint on the central widget in a main window, you must reimplement the paintEvent() for the central widget, not for the main window.
    Quote Originally Posted by Shuchi Agrawal View Post
    activate context menu(floating menu)
    See this post.
    J-P Nurmi

  8. #7
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: no error???? why???

    hey jpn,
    thanks for menu n paint help.
    but i m generally creating .ui files,then .h and .cpp files anr running in cmd prompt. so can u help me to make my project with Visual Studio
    i hv installed VS C++ 6.0 on my system but not able to use it as i dnt know.

  9. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: no error???? why???

    Quote Originally Posted by Shuchi Agrawal View Post
    so can u help me to make my project with Visual Studio
    i hv installed VS C++ 6.0 on my system but not able to use it as i dnt know.
    The commercial edition of Qt has at least some loose integration to VS6.
    Presumably you have the commercial edition of Qt so try downloading and installing the Qt-VsAddin package. The package should give you some tools for managing Qt project directly from VS.

    Another solution is to add "CONFIG += console" to the .pro file to make an additional console window appear for the debug output.
    J-P Nurmi

  10. The following user says thank you to jpn for this useful post:

    Shuchi Agrawal (11th January 2007)

  11. #9
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: no error???? why???

    Quote Originally Posted by jpn View Post
    Another solution is to add "CONFIG += console" to the .pro file to make an additional console window appear for the debug output.
    this thing is not working n i wil implement ur plugin suggestion n wil let u know..

    hey i m attaching my code.so can u see u tell that is it the right way to paint on central widget(its the way u suggested). if not plz tel me the correct way..

    and is the moveDockWindow is the same for Floating window in qt4 or is there some other function or class for same?

  12. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: no error???? why???

    Quote Originally Posted by Shuchi Agrawal View Post
    this thing is not working n i wil implement ur plugin suggestion n wil let u know..
    You need to always re-run qmake after modifying the .pro file to generate a new makefile. Did you, by any chance, forget that step?

    Quote Originally Posted by Shuchi Agrawal View Post
    hey i m attaching my code.so can u see u tell that is it the right way to paint on central widget(its the way u suggested). if not plz tel me the correct way..
    I can't see any attachments..

    Quote Originally Posted by Shuchi Agrawal View Post
    and is the moveDockWindow is the same for Floating window in qt4 or is there some other function or class for same?
    What do you mean by "moveDockWindow"? For example the "Sidebar" in Qt Designer is a QDockWidget. Did you mean that?

    I can see two Qt3Support methods called "moveDockWindow":

    Do they have something to do with this? Please be specific with the terms and class names you use. It will be easier for others to interpret the meaning of the post.
    J-P Nurmi

  13. The following user says thank you to jpn for this useful post:

    Shuchi Agrawal (12th January 2007)

  14. #11
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: no error???? why???

    Quote Originally Posted by jpn View Post
    The commercial edition of Qt has at least some loose integration to VS6.
    Presumably you have the commercial edition of Qt so try downloading and installing the Qt-VsAddin package. The package should give you some tools for managing Qt project directly from VS.
    Bah sorry, it's reading right there in the first post that you are using an evaluation version. Actually, I have no clue if the evaluation version contains the Qt VsAddin package (which is the only official way to integrate Qt4 into VS6). Can anyone confirm whether it does or not? Sorry for the confusion.
    J-P Nurmi

  15. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: no error???? why???

    Quote Originally Posted by jpn View Post
    Can anyone confirm whether it does or not? Sorry for the confusion.
    AFAIK it does.

  16. #13
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: no error???? why???

    Quote Originally Posted by jpn View Post
    Bah sorry, it's reading right there in the first post that you are using an evaluation version. Actually, I have no clue if the evaluation version contains the Qt VsAddin package (which is the only official way to integrate Qt4 into VS6). Can anyone confirm whether it does or not? Sorry for the confusion.
    hey jpn,

    form.cpp
    form.h
    form.ui

    above are the code.so check them n tel tht is it the right way to paint(draw line n a point) on the central widget on a menu click event?[i think its not the right way, though its working]

    by floating window i mean the sidebar which u can see on paint application and which can be dragged to any part of the paint window.
    plz see to it..
    thaks in advance
    Last edited by Shuchi Agrawal; 12th January 2007 at 05:47.

  17. #14
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Afaik??

    originally osted my WYSOTA

    can u tel me ful form of AFAIK?
    Last edited by Shuchi Agrawal; 12th January 2007 at 05:01.

  18. #15
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default sidebar

    Quote Originally Posted by jpn View Post
    I can't see any attachments..
    i have atached them now.

    Quote Originally Posted by jpn View Post
    What do you mean by "moveDockWindow"? For example the "Sidebar" in Qt Designer is a QDockWidget. Did you mean that?
    yes i mean with sidebar only which is QDockWidget class in Qt.
    thanks

  19. #16
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: no error???? why???

    AFAIK == As Far As I Know

    for integrating Qt with Visual Studio check this

    I have integrated Qt Open Source edition with Visual Studio 2005. But yes designer is not integrated , u have to copy the ui files and compile.
    hope this helps

  20. #17
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: no error???? why???

    Quote Originally Posted by aamer4yu View Post
    AFAIK == As Far As I Know
    thanks

    the link http://qtnode.net/wiki/Qt4_with_Visual_Studio w/c u referred is good.but,
    when in this its given steps of qt open source[not commercial evaluation version] with VS 6.0
    so in the step Patching the Qt sources i m getting the following :

    C:\>cd qt\4.2.2

    C:\Qt\4.2.2>nmake \?

    Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
    Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

    NMAKE : fatal error U1069: no match found for wildcard '\?'
    Stop.

    C:\Qt\4.2.2>nmake /?

    Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
    Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

    Usage: NMAKE @commandfile
    NMAKE [options] [/f makefile] [/x stderrfile] [macrodefs] [targets]

    Options:

    /A Build all evaluated targets
    /B Build if time stamps are equal
    /C Suppress output messages
    /D Display build information
    /E Override env-var macros
    /HELP Display brief usage message
    /I Ignore exit codes from commands
    /K Build unrelated targets on error
    /N Display commands but do not execute
    /NOLOGO Suppress copyright message
    /P Display NMAKE information
    /Q Check time stamps but do not build
    /R Ignore predefined rules/macros
    /S Suppress executed-commands display
    /T Change time stamps but do not build
    /U Dump inline files
    /Y Disable batch-mode
    /? Display brief usage message

    C:\Qt\4.2.2>installpatch42.bat
    patching file examples/threads/waitconditions/waitconditions.pro
    patching file misc/bcc32pch/bcc32pch.cpp
    patching file misc/bcc32pch/bcc32pch.pri
    patching file misc/bcc32pch/bcc32pch.pro
    The next patch would create the file misc/bcc32pch/Makefile.win32-borland,
    which already exists! Assume -R? [n] y // when i m pressing "n" then its microsoft error
    patching file misc/bcc32pch/Makefile.win32-borland
    Press any key to continue . . .

    C:\Qt\4.2.2>configure.exe --help
    'configure.exe' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Qt\4.2.2>qconfigure.exe --help
    'qconfigure.exe' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Qt\4.2.2>

    so can u help me out in this???

  21. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: no error???? why???

    Quote Originally Posted by Shuchi Agrawal View Post
    C:\Qt\4.2.2>configure.exe --help
    'configure.exe' is not recognized as an internal or external command,
    operable program or batch file.
    AFAIR you can't recompile the evaluation version, so configure.exe isn't shipped with it.

  22. #19
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: no error???? why???

    Quote Originally Posted by jacek View Post
    AFAIR you can't recompile the evaluation version, so configure.exe isn't shipped with it.
    oh is it??..ok...
    thanks...

  23. #20
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: no error???? why???

    hey jpn,
    i hv created a new thread for my paint ques.. so plz reply on tht..
    thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.