Results 1 to 2 of 2

Thread: Access to QDateEdit value and QCombobox

  1. #1
    Join Date
    Dec 2016
    Posts
    3
    Qt products
    Qt5 Qt Jambi
    Platforms
    Windows

    Default Access to QDateEdit value and QCombobox

    Hello
    I work on an application with qt creator and oracle
    I want to add a patient in my database oracle
    The patient must fill the window and then when he presses the button it must be added
    The problem I do not know how to access the variable birthdate of type QDateEdite and Blood group QCombobox and sex of type radioBotton to add them in my oracle table
    la5.PNG
    Let's know that I usually use this code to add
    exemple : add doctor
    bool doctor::ajouter()
    {
    QSqlQuery query;
    QString str= "insert into doctor values('"+specialite+"','"+nom+"','"+prenom+"','"+ pseudo+"','"+mdp+"',"+ QString::number(id)+")";
    qDebug()<<str;

    if(query.exec(str))
    {
    //QMessageBox::information(this,tr("ajouter"),tr("aj outer"));
    return true;
    }
    else
    {
    //QMessageBox::information(this,tr("error::"),query. lastError().text());
    return false ;
    }
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Access to QDateEdit value and QCombobox


Similar Threads

  1. How to put empty value in QDateEdit?
    By sawerset in forum Qt Programming
    Replies: 5
    Last Post: 14th October 2019, 22:06
  2. access selected value of QcomboBox has problem
    By isan in forum Qt Programming
    Replies: 3
    Last Post: 1st May 2016, 22:37
  3. Replies: 1
    Last Post: 20th May 2015, 12:21
  4. insert a QDateEdit in a QComboBox
    By Qiieha in forum Qt Programming
    Replies: 5
    Last Post: 28th June 2011, 10:37
  5. 2 QDateEdit with 1 QCalendarWidget ?
    By ouekah in forum Newbie
    Replies: 4
    Last Post: 26th April 2010, 10:24

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.