Qt India

RSS Feed
A group for the Indian Qt Developer community. To learn, discuss and showcase Qt apps, ask questions, troubleshoot and help each other. All other members are also welcome to join.
Founder: Deleted Member # 4a2
Members: 700
Category: Regional
Join group

This is an overview of the latest updated topics, visit the full forum here.

1
replies

Static IP in Wifi Connection Qt

by: lalvishnu12 | Views: 53 | Forum: India | Last post by p3c0, February 24, 2015

Hi,

How to set Static IP for the Wifi Connection using QNetworkSessionManager?

0
replies

WIFI session disconnection problem in Ubuntu Qt

by: lalvishnu12 | Views: 42 | Forum: India

Hi,

I am using *QNetworkSession *class to scan and connect wifi networks.
I can connect/disconnect to a wifi network through the QNetworkSession::open() and QNetworkSession ::stop()
functions in windows.

But in Ubuntu 14.04 the disconnect function doesn’t work. The QNetworkSession::State set to “clossing” but never set to “disconnected” flag.

1
replies

Embed Qt Widget into Qml view in QtQuick 2.0

by: lalvishnu12 | Views: 36 | Forum: India | Last post by sierdzio, February 23, 2015

Hi,

How can I embed Qt Widget into a QmlView in QtQuick 2.0?

4
replies

Read or write the thumbnail embedded in a JPEG image

by: lalvishnu12 | Views: 189 | Forum: India | Last post by SGaist, February 6, 2015

Hi,

I am new to Qt. I want to know how to read or write the thumbnail embedded in JPEG image using Qt classes.

I found that the “QMediaMetaData Namespace” contains the “ThumbnailImage” identifier containing the thumbnail data. But I didn’t get any examples related to that.

Please help me to find a solution.

11
replies

how to take input date from user in qdateedit and show database accordingly

by: vikchh00@gmail.com | Views: 942 | Forum: India | Last post by , February 2, 2015

how to take input any date from user in qdateedit or calenderwidget and show database accordingly by clicking button now my code is showing databse of only current date(todays date) i want user to selct date and show data of that particular date

  1. void MainWindow::on_pushButton_2_clicked()
  2. {
  3.     QCalendarWidget *calendar=new QCalendarWidget;
  4.     QDateEdit *dateedit=new QDateEdit;
  5.  
  6.  
  7.     QDate d=calendar->selectedDate();
  8.     ui->dateEdit->setDate(d);
  9.  
  10.  
  11.     int  q= d.year();
  12.     QString q1=QString::number(q);
  13.     int q2=d.month();
  14.     QString q3=QString::number(q2);
  15.     int q4=d.day();
  16.     QString q5=QString::number(q4);
  17.  
  18.     QSqlQueryModel *mode =new QSqlQueryModel(ui->print);
  19.     mode->setQuery(QString("select * from health10  where month(Datestamp)=\""+q3+"\" and day(Datestamp)=\""+q5+"\" and year(datestamp)=\""+q1+"\" ;"));
  20.     ui->print->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
  21.     ui->print->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
  22.     ui->print-> setModel (mode);

[edit: added missing coding tags @ SGaist]

3
replies

Beginner

by: sarabjot10 | Views: 221 | Forum: India | Last post by Andre, January 26, 2015

Guys i am new to QT…how to start? i want to develop a chatting application…

5
replies

Unable to add library to the .pro file of the target file

by: binnet | Views: 253 | Forum: India | Last post by sierdzio, January 23, 2015

I have created a shared library in Qt 5.0.2 called “something”. Now, 4 files have been created (something.pro,something.h,something_global.h and something.cpp).
I want to use this library in another project called “trial”. How to use the library “something” in “trial”?

Please help me as I am new to Qt as well as Linux(Fedora 16).
I know that I should use
LIBS += [path to library files]
INCLUDEPATH+= [path to header files]

I am unable find the library file (something.so).
Will “something.so” be auto generated if I have created the library?—

1
replies

Downloading data ZIP file from website

by: rambabuy | Views: 217 | Forum: India | Last post by sierdzio, January 13, 2015

Hi Experts ,

I am downloading data from www.nseinda.com
and the link is “http://www.nseindia.com/content/historical/EQUITIES/2015/JAN/cm12JAN2015bhav.csv.zip”

But i am downloading 0 size file ..

anything wrong ? or any working program for downloading files from web?

@downloader::downloader(QObject *parent) : QObject(parent)
{ qDebug() << FILE<<” : “ << FUNCTION << “ Entering”; myprocedure(); qDebug() << FILE<<” : “ << FUNCTION << “ Leaving”;
}

void downloader::downloadFile(const QString &url, const QString &aPathInClient)
{ qDebug() << FILE<<” : “ << FUNCTION << “ Entering”; QNetworkAccessManager m_NetworkMngr; QNetworkReply *reply= m_NetworkMngr.get(QNetworkRequest(url)); QEventLoop loop; QObject::connect(reply, SIGNAL),&loop, SLOT)); loop.exec(); QUrl aUrl(url); QFileInfo fileInfo=aUrl.path();

QFile file(aPathInClient+”\\”+fileInfo.fileName()); file.open(QIODevice::WriteOnly); file.write(reply->readAll()); delete reply; qDebug() << FILE<<” : “ << FUNCTION << “ Leaving”;

}
void downloader::myprocedure()
{ qDebug() << FILE<<” : “ << FUNCTION << “ Entering”;

QString path; QString localpath; QMessageBox msgBox; QMessageBox msgBox2; path = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); path = “C:/Users/ryerajan/build-untitled2-Desktop_Qt_5_3_MinGW_32bit-Debug/base/download/cm01OCT2014bhav.dbf.zip”; localpath = path; // QMessageBox msgBox2; msgBox2.setText(“You can download the update from the web.”); msgBox2.setInformativeText(“Do you want to download the file now?”); msgBox2.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox2.setDefaultButton(QMessageBox::Yes); int ret = msgBox2.exec(); if (ret == QMessageBox::Yes) { downloadFile [...]
0
replies

Qt::TapGesture Gesture is not working properly

by: Akhil. V . S | Views: 208 | Forum: India

I have created a custom gesture as,

  1. Gesture*
  2. CustomTapGestures::create(QObject* pTarget)
  3. {
  4.    QGesture *Gesture = new QTapGesture(pTarget);
  5.    return Gesture;
  6. }
  7.  
  8. QGestureRecognizer::Result
  9. CustomTapGestures::recognize(QGesture* Gesture, QObject *Object, QEvent *event)
  10. {
  11.    QGestureRecognizer::Result result = QGestureRecognizer::Ignore;
  12.  
  13.    return result;
  14. }
  15.  
  16. void
  17. CustomTapGestures::reset(QGesture *Gesture)
  18. {
  19.    Gesture->setProperty("startPoint", QVariant(QVariant::Invalid));
  20.    parent::reset(Gesture);
  21. }

and I am using that in my event class as

  1. Screen::Screen(Desktop *Dk)
  2. {
  3.     QVBoxLayout *screenLayout = new QVBoxLayout ;
  4.     screenLayout->addWidget(Dk);
  5.     setLayout(screenLayout);
  6.     QGestureRecognizer* CTap = new CustomTapGestures ;
  7.     Qt::GestureType CTapId = QGestureRecognizer::registerRecognizer(CTap) ;  ;
  8.  
  9.     grabGesture(CTapId);
  10. }
  11.  
  12. bool Screen::event(QEvent *event)
  13. {
  14.     event->accept();
  15.      if (event->type() == QEvent::Gesture)
  16.          return gestureEvent(static_cast<QGestureEvent*>(event));
  17.      return QWidget::event(event);
  18. }
  19.  
  20.  
  21. bool Screen::gestureEvent(QGestureEvent *event)
  22. {
  23.     if (QGesture *tap = event->gesture(Qt::TapGesture))
  24.         ontapTriggered(static_cast<QTapGesture *>(tap));
  25.     return true;
  26. }
  27.  
  28. void Screen::ontapTriggered(QTapGesture *gesture)
  29. {
  30.     if( gesture->state() == Qt::GestureFinished )
  31.         qDebug() << "working QTapGesture" ;
  32. }

Here Desktop *Dk is a normal widget having size 1280×640, and when tap on screen it is giving output as working tapgesture even if in my tap recognize am disabled it whatever be the event.. ( i am testing this because for a certain condition I want to disable the tap) please give me a solution Thanks in advace

2
replies

How to use Hunspell in Qt.

by: Vikas A | Views: 324 | Forum: India | Last post by Vikas A, December 16, 2014

I am working on Windows 7 (Qt with MinGW ), i want to user Hunspell in my project.
It is very complicated to use it in windows environment.

Please some one can provide a like to any document (not Hunspell standard documents) or any other help.
Thanks,

This is an overview of the latest updated topics, visit the full forum here.