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??????
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??????
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):
You are including the whole QtGui module which leads to including QMessageBox as well.Object::connect: No such slot MainWindow::ui.disp()
Object::connect: (sender name: 'pushButton')
Object::connect: (receiver name: 'MainWindow')
J-P Nurmi
Shuchi Agrawal (11th January 2007)
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)
Are you running the program in Visual Studio? It should appear in the debug output window.
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.
See this post.
J-P Nurmi
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.
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
Shuchi Agrawal (11th January 2007)
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?
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?
I can't see any attachments..
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
Shuchi Agrawal (12th January 2007)
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
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???
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
originally osted my WYSOTA
can u tel me ful form of AFAIK?
Last edited by Shuchi Agrawal; 12th January 2007 at 06:01.
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 06:47.
Bookmarks