Compile a simple QTdesigner instance

Source: Internet
Author: User
Tags parse error qt designer
Compile a simple QTdesigner instance-general Linux technology-Linux technology and application information. The following is a detailed description. I followed the practices of a small QT designer instance on the Internet, but a problem occurred during compilation.
Shown:
[Root @ localhost cfconv] # qmake-o Makefile cfconv. pro
[Root @ localhost cfconv] # make
/Usr/lib/qt-3.1/bin/uic cfconvmainform. ui-o. ui/cfconvmainform. h
G ++-c-pipe-Wall-W-O2-march = i386-mcpu = i686-g-DGLX_GLXEXT_LEGACY-fno-use-cxa-atexit-fno-exceptions tions-DQT_NO_DEBUG- i/usr/lib/qt-3.1/mkspecs/default-I. -I/usr/lib/qt-3.1/include-I. ui/-I. moc/-o. obj/main. o main. cpp
/Usr/lib/qt-3.1/bin/uic cfconvmainform. ui-I cfconvmainform. h-o. ui/cfconvmainform. cpp
G ++-c-pipe-Wall-W-O2-march = i386-mcpu = i686-g-DGLX_GLXEXT_LEGACY-fno-use-cxa-atexit-fno-exceptions tions-DQT_NO_DEBUG- i/usr/lib/qt-3.1/mkspecs/default-I. -I/usr/lib/qt-3.1/include-I. ui/-I. moc/-o. obj/cfconvmainform. o. ui/cfconvmainform. cpp
In file already ded from. ui/cfconvmainform. cpp: 22:
Cfconvmainform. ui. h: In member function 'virtual void
CfconvMainForm: convert ()':
Cfconvmainform. ui. h: 18: parse error before numeric constant
Make: *** [. obj/cfconvmainform. o] Error 1
The default program of cfconvmainform. ui. h is:
Void cfconvMainForm: convert ()
{
/* Declare some variables */
Double celsius_input, result = 0;
/* Retrieve Celsius input */
Celsius_input = celsiusLineEdit-> text (). toDouble ();
/* Convert to Fahrenheit */
Result = (celsius_input * (9.0/5.0) 32.0;
/* Enter result and clear Celsius input box */
FahrenheitLineEdit-> setText (QString: number (result, 'F', 1 ));
CelsiusLineEdit-> clear ();
}
I don't know what went wrong. Please solve it !!! : 0w5ty (1
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.