qt4

QDialog doesn't accept text input if modal

Strange bug with a Qt dialog ( Qt4.6/windows) If the dialog is started from MainWindow (from a toolbar/or menu action) and it is modal none of the text boxes will accept any edits. Other controls (drop down, buttons etc) all work. If I make the dialog non-modal, with show() rather than exec(), it works perfectly! Anyone come across a...

is there a performance difference between QList<QList<int> >myList; and int ** myList; ?

I would like to know if it is more efficient to use a int ** than a QList > or if they are pretty much equal. I have to do alot of calculations so I might want to get to faster one ...

qt embedded widget installation problem

Hi Geeks, I recently downloaded the QT embedded widget source code and documentation. I am using QT creator for QT development. After downloading the source code and project files I dont know how to use it in QT creator. In the embedded widget package I have the installation instructions. In the install documentation its told to run the...

QProgressBar Error

I am trying to add QProgressBar in my code but having some troubles. I added progress bar via Designer and in the code, I pass the pointer to QprogressBar object to a separate thread to have it update QProgressBar as it's processing data, however, I get this message: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Assertion `((int) ((xcb_req) -...

How to use a Qt 4 plugin or self developed plugin in qt application?

I'm trying to make a simple application for calendar and it doesn't seem to link properly. Platform: WinXP, Qt: 4.5.3 with MinGW The application is trying to use a predeveloped qt plugin "worldtimeclockplugin" from C:\Qt\4.5.3\plugins\designer. I dragged and dropped this widget in Qt designer on a dialog and then tried to build the app....

openGL screensaver causes problems

I have an application written in QT4, that uses an openGL window. It has been running happily for months. Windows XP, service Pack 3, Recently I was diddling with my screensaver, and happened to select the 3D text choice. When I previewed it, the QT4 application seg-faulted immediately. When I ran in the debugger,it is crashing in i...

Qt4: Scale invariant qgraphicsitem outlines

I am drawing some polygons using the Qt4 GraphicsView framework, and I allow the user to zoom in and out of the drawing. I would like the polygons to get larger and smaller as the user changes zoom levels (scale) in the view, but is there a way to make the outline thickness always remain the same? Thanks! ...

QT4 Memory Management

I come from a fairly strong C background, and have a rather solid foundation in C++. More recently I've been working with C# and other higher level languages. A project I'm looking at working on could really benefit from using QT4, but I have some questions on memory management I can't seem to understand. I've read the QT4 documentation ...

New to QT help needed.

Hi, i am new to QT, i don't have any knowledge about it. from scratch i need to learn, if you people have some tutorials or some technical blogs please feel free to share with me.. i have seen some stuffs in troltech, tell me any thing else apart from it. Thanks ...

How can I create a HTTP POST request with Qt 4.6.1?

How can I create a HTTP POST request with some URL encoded parameters using Qt 4.6.1? I figured out that I can create a QNetworkRequest, set all the parameters there and send it via QNetworkAccessManagers post method. But how can I add some URL-encoded parameters to the request? In the end I want to access the Eve API using Qt/C++. A P...

Insert Images to list

Hi.. i am new to QT, i am facing some problems in inserting images to list view. can you please figure what is the problem in code snippet int main(int argc, char *argv[]) { QApplication a(argc, argv); QListWidget* list=new QListWidget(); QListWidgetItem *item1=new QListWidgetItem(QIcon(":\temp\boat.png"),"BlueHills",list); ...

[C++] Function pointer with extra data

I have class which handles packages: typedef void (*FCPackageHandlerFunction)(FCPackage*); class FCPackageHandlers{ ... void registerHandler(FCPackage::Type type, FCPackageHandlerFunction handler); void handle(FCPackage* package); ... QHash<FCPackage::Type, FCPackageHandlerFunction> _handlers; }; Then I have a serv...

Pointer to QList - at() vs. [] operator

I'm having problem with understanding some of QList behavior. #include <QList> #include <iostream> using namespace std; int main() { QList<double> *myList; myList = new QList<double>; double myNumber; double ABC; for (int i=0; i<1000000; i++) { myNumber = i; myList->append(myNumber); AB...

dynamic memory in QList

I don't have much experience with QT and this problem came out today. QList<int> memList; const int large = 100000; getchar(); for (int i=0; i<large; i++) { memList.append(i); } cout << memList.size() << endl; getchar(); for (int i=0; i<large; i++) { memList.removeLast(); } cout << memList.size() << endl; getchar(); After ...

how to create & call slot in other class than MainWindow?

Currently Im using QT Creator which created UI file for view and I'm a QT starter. There is a part I am curious is that how can i create another Class for, let say a GraphicView, so that I can send signal and slot to that class instead of the main form? Side Question: why I can't edit Singal and Slot in other place than MainWindow in E...

How to Customize ListView in QT

HI.. i am new to QT,i want to know how to customize the listview in QT i.e i want to add multiple icon in single row.. etc.. i tried lot i am not getting how to do that.. i tried with Qlistwidget, in tat i can only insert single row with one image.. i am not able to place multiple icon with desired locations.. please assist me, which...

calling library functions from GUI in Qt creator

I have libraries created from visual studio.I want to use the functions in library in Qt GUI. How to do that?How to make the GUI understand that it depends on the lib? ...

in Qt, How do I make a window be the current window?

My QT app has multiple windows and sometimes, even though the windows are already open but burried under other windows, the user will select an option to open one from the mainwindow menubar in which case I want to simply bring it up and make it the current one. Now using QWidget->raise makes this window go on top of all other windows b...

Qt 4.6 - How to drag and drop into a QGraphicsView in QtCreator?

Hello, I've been trying to figure out how to drag and drop an image into a QGraphicsView using Qt and the QtCreator IDE. I have read the documentation here: http://doc.trolltech.com/4.6/qgraphicsscene.html#dragEnterEvent This documentation is too general for me to understand. Can anyone give me an example that works? I also found a ...

How to get the paint event for Buttons in QT

Hi.. i am new to QT, i tried lot searching samples of how to get the button paint event in QT.. i am not getting the way to do it.. how to set the delegates for pushbutton in QT?. how to get the paint event for pushbutton? i read so many articles, it says we can get the paint event of button we can customize too. but i didnt get the ...