qt

how to get the focus of MyLinedit ?

Hi all, I am new to Qt application development. In my Application i have built a QWERTY keypad usign QSignalMapper.I have 3 QLineEdit boxes above this keypad area. Now, when ever i select any line, i didnt get to know which line object gets selected. If i subclass QLineEdit, and Reimplement this, than also i am not knowing which part...

Using main menu as toolbar in Qt

Hi, I'd like to create a toolbar that contains main menu, just like the standard main menu at the top of the window. Is there some fast way to do this in QT ? I know that I can create a toolbar with buttons and context menus :-) Thx for help. ...

QT:how to use sleep() with paintEvent

hi everyone,I am creating an application in which i am using a loop within a paintevent to draw four rectangles.and i want that each rectangle must be drawn after 500ms.for that i am applying msleep().but by using this whenever i run the application,it hangs up for 2000ms and then draws all the rectangles at the same time.can anyone tell...

Qt:creating a dynamic button

hello. I want to create an application in which i will create a button and by pressing that button as list of options will open and i can choose one of them.for example i will create a button named "searching algorithm" and by clicking this button a list will open at same place which display two options as linear search and binary search...

Qt: show image on widget

i want to display a car photo. after loading, user can move the car by pressing keys on keyboard. when he press "up arrow", car will move upwards. which methos should i use to show the photo. Qlabel.setpixmap?? The code below shows the image on a new widget, but i want to show it on my mainwindow page. What should i do? Thank you void...

How to get the MIME type of a file in Qt?

Is there a way to get the MIME type of a file in Qt? I am writing an application that needs to find the MIME type of a given file. ...

Qt and MSVC issue with .ui file not updating

I found a sample on the Ogre forums of using Qt and Ogre together. I setup Qt, installed the MSVC plugin and created a new Qt project. I added all of the files, everything ran great. I double clicked the .ui file in MSVC and it brought up Qt Designer, where I changed the window title and saved. For some reason, no matter what changes I ...

PyQtWebkit and java script

Hello, I have a page with js. I need get dom after js execute at webpage. Js inserts text in the div with name 'sdl'. I need get value between . Value can not be parsed in js source, it is generated by Js. How to do it? Sorry for my english. ...

Qt: Best way to implement "oscilloscope-like" realtime-plotting

Hi I'm working on a Gui-Module for Qt to plot realtime measurements like in an digital oscilloscope, based on Qwt. Everything works so far like it should, but maybe there are some features left to add ;-) In the moment the data is stored column-wise in QVectors, together with one global timeReference QVector in one seperate QObject. So...

Qt: how to clear the fields of form?

Hello, I have some form with fiels, combos etc. I would like to go over through all the widgets on the form and if for example it's textfield, clear it, something like that: foreach(QObject *child, this->ui->children()) { QLineEdit *txtField = qobject_cast<QLineEdit *>(child); if (txtField) { txtField->clear(); }...

Can Python + Qt combination produce a real time spectral analysis tool?

Hi I want to develop a tool that does the following things. take in a live voice recording produce a real time spectrogram show the time-domain signal output few values extracted from the spectral analysis All of these have to be kept updated in a window as the voice is recorded. I have worked with numpy. But I'm completely new to...

QWidget - Issues

Hi, On execution (no compile error) I get on the console QWidget::setLayout: Attempting to set QLayout "" on CGSearchResult "", which already has a layout I am using the following code. Please help me.. THanks is advance CGSearchResult::CGSearchResult(QWidget *parent) : QWidget(parent) { initControls(); SetTableContent(); } ...

Qt's QTableView and large numbers

How to make it show large numbers in QTableView like 10030232145 and not as 1.02342e+10? ...

Including resource files in Qt Creator build directory

Hello, I have a project I am working on with Qt Creator and I'm trying to get it to add my resource files to my build directories (output) automatically. I have the files in the project directory, but I don't know how to edit the *.pro file to make it include additional content files. (If that is even possible?) Does anyone know how to...

How to get STDOUT from a QProcess?

I thought I was going to get the output from a QProcess using the following code: // Start the process process.start(tr("php-cgi www/test.php"),QIODevice::ReadWrite); // Wait for it to start if(!process.waitForStarted()) return 0; // Continue reading the data until EOF reached QByteArray data; while(process.waitForReadyRead()) ...

Getting the keyevent info from Virtual Keyboard of symbian touch devices

Hi All, Is there any way to obtain the keypress info for the green-tick (green check marked key) present in the input panel/ virtual keyboard? Our application is for symbian touch devices. In my application I wanted the url to start loading as soon as the QLineEdit has been edited i.e., as soon as the green check marked key in VKB has...

Continuous uploading causes QNetworkReply error "Cannot allocate memory"

I have an Qt application for symbian that receives gps data, stores it into a database and tries to post it to a server. First two steps work fine but continuous posting either crashes my application or kills my internet connection. I have modified my application for debugging purposes so it only does post data to a server in every 10th...

What Linux IPC to use between a c program and a C++ Qt app?

Hi I have a old school c program that now and then need to tell a C++ Qt based application about some "events" that has occurred on my system. But when I started to work with this problem I noticed that some ipc techniques is quite easy to use in the c program. And then we have some Qt specific styles that works quite well in the "Qt...

how to prevent QTableModel from updating table depending on some condition

hello , i have a mysql tables that uses lock-write mechanism. the lock might go for too long (we're talking about 1-2 minutes here). i had to make a check if the table is in use or not before the update is done (using beforeUpdate signal) but after checking and returning that my table is in use , system hang until the other user unl...

QTableView Pagination

Hi, I am using the Nokia QT for develop the mobile application. I want to make the pagination with QTableView. Is it possible ? I will get data from the webservice. If the data size is 20 means then i have to show the table in twopage. If it is 30 means then three page. Please help me.. THanks is advance ...