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 directory

    I 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=61015963

    I 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 ?


  • Qt Champions 2016

    Hi
    It was made for older version of Qt:
    Remove "QtGui/" in the #includes and add
    QT += widgets
    to the .pro file

    BUT!
    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.



  • @mrjj
    Hi,
    Do you have any suggestion for me to have LED plugins ? I wanted to have like LED blinking for LED simulation.

    Thanks !


  • Qt Champions 2016

    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 ?


  • Qt Champions 2016

    @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-designer

    And 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"));



  • @mrjj
    Hi ,
    Thanks for the suggestions ! I will give them a try !


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.