C1083 Error : Cannot open include file: No such file or directory [SOLVED]
-
Hello everyone,
I have 4 errors of C1083 which are
error: C1083: Cannot open include file: 'QtGui/QApplication': No such file or directory
error: C1083: Cannot open include file: 'QDialog': No such file or directory
error: C1083: Cannot open include file: 'QDialog': No such file or directory
error: C1083: Cannot open include file: 'QWidget': No such file or directoryI am trying to run an example given from a QLED custom widget plugin from the link below
http://qt-apps.org/content/download.php?content=72482&id=1&tan=61015963I am currently using QCreator 3.4.2 based on Qt 5.5.0 . Windows 7 . Is there any solution for me to run this example ? Alternatively, is there any suggestion how can I get other LED plugins or examples ?
-
Hi
It was made for older version of Qt:
Remove "QtGui/" in the #includes and add
QT += widgets
to the .pro fileBUT!
its a plugin and unless you are using the MS VC compiler,
the plugin will not work as it must be compiled with same compiler as Qt Creator.So even that you can build example, it will not work as you need to build and install plugin first.
-
Hi
It was made for older version of Qt:
Remove "QtGui/" in the #includes and add
QT += widgets
to the .pro fileBUT!
its a plugin and unless you are using the MS VC compiler,
the plugin will not work as it must be compiled with same compiler as Qt Creator.So even that you can build example, it will not work as you need to build and install plugin first.
-
Well you could just take the class used for the plugin (the led class) and
make your own widget which you can use from code. (not in Designer)Hmm " LED blinking for LED simulation"
I do not think this led can blink. ?
You could also just draw led on / led off images on screen.What would be the source of the on/off? Just blinking for fun or
to show like modem etc? -
Well you could just take the class used for the plugin (the led class) and
make your own widget which you can use from code. (not in Designer)Hmm " LED blinking for LED simulation"
I do not think this led can blink. ?
You could also just draw led on / led off images on screen.What would be the source of the on/off? Just blinking for fun or
to show like modem etc?@mrjj
HI,
How do I make my own widget ? Well specifically I wanted to make a simple simulation of the tell-tale(automotive) which shows left and right signal, handbrake, beam on, high beam, probably gears(P,R,N,D,3,2,1), ABS, and some other indicators. Since I cant really find any plugin for any of those, I decided to go with LED to replace them. Technically as long something that can appear as ON and OFF would do the job .... I think ? -
@mrjj
HI,
How do I make my own widget ? Well specifically I wanted to make a simple simulation of the tell-tale(automotive) which shows left and right signal, handbrake, beam on, high beam, probably gears(P,R,N,D,3,2,1), ABS, and some other indicators. Since I cant really find any plugin for any of those, I decided to go with LED to replace them. Technically as long something that can appear as ON and OFF would do the job .... I think ?@Lazy93
To make your own version of the led, you would take all code that are not part of the actual plugin, but the
the led class itself. In this case both qled.cpp and qled.h.
Add them your project and in your main window code,new a QLed and set its properties from code.
Note it also seems to need some resources so might need to add those to project too.Alternative you can follow this
http://www.ics.com/blog/integrating-custom-widget-qt-designerAnd make your own version and stop at
"At this point, we have a useful custom widget. We can insert it into layouts programmatically"If you do not want to get into creating a new widget, you could also use a QLabel which can show an image.
So you could simply set a image for ON/OFF state. Like
ui->label->setPixmap(QPixmap("c:/mypath/on.png")); -
@Lazy93
To make your own version of the led, you would take all code that are not part of the actual plugin, but the
the led class itself. In this case both qled.cpp and qled.h.
Add them your project and in your main window code,new a QLed and set its properties from code.
Note it also seems to need some resources so might need to add those to project too.Alternative you can follow this
http://www.ics.com/blog/integrating-custom-widget-qt-designerAnd make your own version and stop at
"At this point, we have a useful custom widget. We can insert it into layouts programmatically"If you do not want to get into creating a new widget, you could also use a QLabel which can show an image.
So you could simply set a image for ON/OFF state. Like
ui->label->setPixmap(QPixmap("c:/mypath/on.png"));