Results 1 to 2 of 2

Thread: qhash.h and qwindowdefs.h

  1. #1
    Join Date
    Oct 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default qhash.h and qwindowdefs.h

    hey guys i am getting lot of errors regarding qhash.h and qwindowdefs.h even though i have not used them in my program.....what to do?
    I have given my code below...


    #define alphaSi 0.473*.001
    #define alphaGe 0.4774*.001
    #define betaSi 636
    #define betaGe 235
    #define etSi 3.74*0.001
    #define etGe 2.2*0.001
    #define niSi pow(10,10)
    #define niGe 2.4*pow(10,13)
    #define K 8.62*pow(10,-5)

    #include "semisim.h" //main class
    #include "diode.h" //class in main
    #include "ui_diode.h"
    #include<qstring.h>
    #include<qmessagebox.h>
    #include<math.h>
    #include<stdlib.h>

    Diode:iode(QWidget *parent) :
    QDialog(parent),
    ui(new Ui:iode)
    {
    ui->setupUi(this);
    }

    Diode::~Diode()
    {
    delete ui;
    }

    void Diode::start_clicked(){

    double voltage,current,ni,Eg;
    QString x;
    int temp,flag;
    bool ok;

    ui->bandgap->clear();
    voltage=ui->doubleSpinBox->value();

    x=ui->temperature->text();
    temp=x.toInt(&ok);

    if(ui->radioButton->isChecked())
    flag=1;
    else if(ui->radioButton_2->isChecked())
    flag=2;
    else
    {
    flag=0;
    QMessageBox messagebox;
    messagebox.critical(this,"ERROR","NO SEMICONDUCTOR IS SELECTED");
    exit(0);
    }
    Eg=band_gap(temp,flag);
    ni=intrinsic_conc( temp, flag, Eg);



    }

    void Diode::current(double vt,int temp){

    double current;

    }

    void Diode::width(double Na,double Nd,double Vb,double Vd){ //Na,Nd,Vbi,Vd

    }

    void Diode::built_in(double Na,double Nd,double Ni){

    }

    double Diode::intrinsic_conc(int temp,int flag,double Eg){
    double ni,e,n1,x;

    if(flag==1){
    e=-1*(etSi-(Eg/temp))/K;
    x=(300/temp);
    n1=pow(x,3)*exp(e);
    }

    else if(flag==2){
    e=-1*(etGe-(Eg/temp))/K;
    x=(300/temp);
    n1=pow(x,3)*exp(e);
    }
    ni=sqrt(n1);
    // printf("%lf",ni);
    ni=ni/pow(10,10);
    ui->intri_conc->insert(QString::number(ni)); //intri_conc is a line edit

    return(ni);

    }

    double Diode::band_gap(int temp,int flag){
    double Eg;

    if(flag==1){
    Eg=1.17-(alphaSi*pow(temp,2))/(temp+betaSi);

    }
    else if(flag==2){
    Eg=0.7437-(alphaGe*pow(temp,2))/(temp+betaGe);
    }
    ui->bandgap->insert(QString::number(Eg)); bandgap is a line edit
    return(Eg);
    }
    Last edited by Mashkur; 25th October 2012 at 18:35.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qhash.h and qwindowdefs.h

    Perhaps if you shared the error messages we might be able help. The first error or two will do.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. Replies: 1
    Last Post: 10th February 2009, 09:42
  2. QHash
    By coderbob in forum Qt Programming
    Replies: 2
    Last Post: 2nd July 2008, 14:29
  3. QHash ordered by value
    By Lele in forum Qt Programming
    Replies: 7
    Last Post: 11th February 2008, 09:30
  4. QHash with 2 keys?
    By MrGarbage in forum Qt Programming
    Replies: 5
    Last Post: 6th September 2007, 01:09
  5. Can QHash::capacity() be smaller than QHash::size()?!?
    By iw2nhl in forum Qt Programming
    Replies: 2
    Last Post: 24th August 2007, 01:17

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.