qt

QTest::keyPress is not returning nativeScanCode

Hi, I am simulating F1 key using QTest::keyPress() method to test keypress event, on simulation of F1 key when i check for nativeScanCode, it returns 0 value. can any one help? //Code snippet //To simulate F1 key press QTest::keyPress(&kboard, Qt::Key_F1); //To check keypress Event void keyboard::keyPressEvent(QKeyEvent* ke) { if ( ke...

Making only one column of a QTreeWidgetItem editable

I have a QTreeWidgetItem with two columns of data, is there any way to make only the second column editable? When I do the following: QTreeWidgetItem* item = new QTreeWidgetItem(); item->setFlags(item->flags() | Qt::ItemIsEditable); all columns become editable. ...

What is a QT Plugin?

What is a QT Plugin? What are differences between a qt plugin and a custom made qt library? Thanks. ...

QLineEdit - focus event

Hi guys, I have to connect focus event from some QLineEdit element (ui->lineEdit) to the method focus(). How can I do this? ...

How to handle form submission in Qt?

I have a QWebView in my Qt app. If the QWebView has a form, how can I intercept its submission and get the values of the form? ...

changing cell background color in qt

hello .. i'm new to pyqt , and i'm still facing some newbie problems :D i have a QTableWidget that is item delegated on a QChoice control ( hope i said it right ) i need to have the cell background color changes whenever a user change the choice control selection briefly: how to change a cell background color in a table widget ?? i...

Uploading a file using post() method of QNetworkAccessManager

I'm having some trouble with a Qt application; specifically with the QNetworkAccessManager class. I'm attempting to perform a simple HTTP upload of a binary file using the post() method of the QNetworkAccessManager. The documentation states that I can give a pointer to a QIODevice to post(), and that the class will transmit the data fo...

QProgressBar not showing progress?

My first naive at updating my progress bar was to include the following lines in my loop which is doing the processing, making something like this: while(data.hasMoreItems()) { doSomeProcessing(data.nextItem()) //Added these lines but they don't do anything ui->progressBar->setValue(numberProcessed++); ui->progressBar->...

Qt and Bluetooth on Symbian S60

Hi all, i am working on a mobile application which needs to use bluetooth to send a file to another mobile device. I'm using Qt for symbian. my problem is that Qt doesn't provide ready to use API for bluetooth.Only Qt extended(which runs on embedded linux) has API for bluetooth. Do you have a clue to use bluetooth from Qt on symbian plat...

Program exit code -SomeNumber

i made a program using Qt for Symbian, its all working very well ... However, it always exits with a status code -10737something when i close the program i think the problem is in the deconstructer, maybe some memory leaks ... any suggestion on how to solve this problem, or to find the error using Qt Creator? thanks ...

Context Menu on QGraphicsWidget

Hi, In my application I have two object type. One is field item, other is composite item. Composite items may contain two or more field items. Here is my composite item implementation. #include "compositeitem.h" CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children) { children = _children; } CompositeItem::~Composit...

macdeployqt and third party libraries

I've got an application project that depends on a couple of shared libraries that I have created myself. According to the Qt 4.6 documentation "Deploying an Application on Mac OSX": Note: If you want a 3rd party library to be included in your application bundle, then you must add an excplicit lib entry for that library to your ...

Gtk+ vs Qt language bindings

Put shortly: For those familiar with language bindings in Qt and Gtk+. E.g. python and ruby. Are there any quality or capability difference? More background: I know C++ and Qt very well. Minimal experience with Gtk+. I know C++ is not ideal for language bindings due to the lack of a well defined ABI (application binary interface). I als...

Container item implementation

Hi, I am working in Train Traffic Controller software project. My responsibility in this project is to develop the visual railroad GUI. We are implementing the project with Qt. By now I am using QGraphicsLinearLayout to hold my items. I am using the layout because I do not want to calculate coordinates of each item. So far I wrote item...

[Qt] How to get rid of OCI.dll dependency when compiling static

Hi, My application accesses an Oracle database through Qt's QSqlDatabase class. I'm compiling Qt as static for the release build, but I can't seem to be able to get rid of OCI.dll dependency. I'm trying to link against oci.lib (as available in Oracle's Instant Client with SDK). Here's my configure line : configure -qt-libjpeg -qt-zl...

How to take snapshot in linux - programmatically C++

I am currently involved in a project which requires me to repeatedly take snapshots of the screen. I am using qt's grabScreen function to do the same. The screen freezes for half a second every time the program takes a snapshot causing the computer to seem to be very slow :( Can anybody suggest me a better method of doing this ? ...

Program crashes in debugger before anything happens

I'm building an application for Windows XP using the MinGW tool chain and it sometimes crashes unexpectedly. So, I'm trying to use a debugger (Gdb) but the program exits with code 03 before anything happens. In fact, all I see from GDB is: [New thread 3184.0x7b8][New thread 3184.0xef8] Program exited with code 03. My suspici...

How to disable Qt dialog default button changing with tab navigation

In Qt 4, by default, tabbing through a dialog changes the default button to be the button tabbed to. This makes tabbing look a bit ugly and distracting as extra redraws take place during tab navigation which distract from point of user focus. Is there a way to disable this Qt functionality and leave the default button unmodified by tab...

What .gitignore I should use with QT projects? (QT Creator)

So, after little thinking I have wrote the following: # In repository we don't need to have: # Compiled object files *.o # Generated MOC, resource and UI files moc_*.cpp qrc_*.cpp ui_*.h # Debug and Release directories (created under Windows, not Linux) Debug/ Release/ # .log files (usually created by QtTest - thanks to VestniK) *.l...

Can I un-check a group of RadioBottoms inside a group box?

radio bottoms inside a group Box will be treated as a group of bottoms. They are mutual exclusive. How can I clean up their check states?? I have several radio bottoms, one of them are checked. How can I "clean" (uncheck) all radio bottoms?? "setChecked" doesn't work within a group, I tried to do following things but failed. My code is...