qt

Is there a bug in my code for populating a QTreeView?

I'm using PyQt 4.4. It's best shown using some pictures. All nodes should have leafs from 0 to 99. They are being incrementally loaded using canFetchMore() and fetchMore(). But for some reason unknown for me this works only for the root node. (Picture 1) If I collapse and expand a node it loads additional 10 values. (Picture 2 & 3) It...

Qt wrapper for C libraries

Hello I'm working on a QT project based mainly on C libraries. I like the way QT works, and would like to make a C++ wrapper(with similar QT style) for each C library I'm working with. What are your recommendations and advices. What should I do, and what I shouldn't. I would like to hear answers based on real life experience. Thanks ...

Detecting memory leaks in C++ Qt combine?

Hi all, I have an application that interacts with external devices using serial communication. There are two versions of the device differing in their implementations. -->One is developed and tested by my team -->The other version by a different team. Since the other team has left, our team is looking after it's maintenance. The othe...

Oversized Qt Fonts on OSX

Why does Qt on OSX appear to default to overly large fonts? Even when you select the same font size manually the fonts appear slightly bigger. Does Qt on OSX use a different font rendering to OSX? Does this improve if you use Qt for Cocoa? In addition, is there a qtconfig tool or equivalent to globally set the font settings for all Qt a...

function with AnsiString params dll call in qt project

I have dll that written on Borland C++. I heed to call function with AnsiString params in this dll from my qt c++ project. ...

Problem with qhttp example qt 4.4.3

hi i'm new here. i'm trying to use qhttp for a update app. but there is a problem for me wich i can not solve. here is the problem: i try to download a file(works perfectly) but if there is no connection to the www the file is created but has 0byte, so that my old file is overritten, which is not so good for the application trying to use...

What's the C++ GUI building option with the easiest learning curve - VS/Qt/wxWidgets/etc.?

I'm looking to be able to build GUI applications quickly and painlessly as possible. I'm competent (though not expert, and have no formal training) in C++, but have never used a GUI building toolkit or framework or anything. I am not a professional programmer and am totally inexperienced and ignorant when it comes to building GUI apps. H...

QT 4.6 release date

Can't find when QT 4.6 will be available (not even on Trolltech's site). Any ideas? EDIT: I don't understand the down votes, especially since I've received an answer with 6 up votes. If you're voting a question down, it would be nice to add a comment explaining why. ...

Including a library in Qt, why isn't this working?

This seems like it should be really simple. I compiled a library in Qt (this newmat library), and produced the file libnewmat.a. Now I need to integrate this library into another project but I just can't get it to work. I've tried a few different things with the LIBS variable in my .pro file including: Win32:LIBS += libnewmat.a #libr...

Mapping widget for Qt

Hello, I need a Qt widget that will allow me to display a map. It needs to be able to: * Run wo a network connection to a map or tile server. A simple bitmap would be fine. * Place widgets, lines and graphics on the map given lat/long * Calculate distances between points. * Compile on Linux and Windows. What would you suggest? Than...

QT: downloadProgress not emitted from QNetworkReply

Hi All I'm trying to build a module which downloads a binary file in QT, using QNetworkAccessManager. I use the same approach detailed in the documentation (see below), but while I do get readyRead signals, downloadProgress never arrives. everything happens on the same thread (the project is big so i cannot paste it all) any ideas? i'...

obtaining text from a QListView

Hey, I have a pointer to a third party QListView object, wich is simply displaying rows of text. What is the best way of getting a hold of that string of text? thanks, Dave ...

QObject::connect issues with QAbstractItemModel

Hey, I have a QListView from which I obtain a QAbstractItemModel with list->model(); After this, I want to connect the dataChanged signal to a custom QObject of mine: if( QObject::connect(model, SIGNAL(dataChanged (const QModelIndex , const QModelIndex ) ), customObject_,SLOT(onText(const QModelIndex , const Q...

Qt4 in Visual Studio 2008 - moc-ed files get excluded from build?

Hi all, Recently I have installed VS Addin from Qt Software and I imported my .pro project to VS2008. Generally, all works fine, with one small but annoying exception. Suppose I have a file.cpp with has a class which declares that it is a Q_OBJECT. So, as such the file is MOC-ed and moc_file.cpp is generated, and is available in Soluti...

QtWebKit, QWebElement::setPlainText() problem

From Qt online help: void QWebElement::setPlainText ( const QString & text ) Replaces the existing content of this element with text. This is equivalent to setting the HTML innerText property. My code: QWebElement login = doc.findFirst("input[name=\"login\"]"); login.setPlainText("alibaba"); qDebug() << login.toPlainText...

Unique random number sequence using qrand() and qsrand()

I want to generate unique random number sequence in QT, Using QDateTime::currentDateTime().toTime_t() as seed value, will qrand() generate unique random numbers? ...

Help getting inserted data after Qt's rowInserted signal

Hey, I have a onText method that connects to a QAbstractItemModel's rowsInserted SIGNAL so I can be notified when new rows have been inserted: QObject::connect(model, SIGNAL(rowsInserted ( const QModelIndex & , int , int ) ), client_,SLOT(onText( const QModelIndex & , int , int )) ) The signal works fine, since I am notif...

Writing a QNetworkReply to a file

I'm downloading a file using QNetworkAccessManager::get but unlike QHttp::get there's no built-in way to directly write the response to a different QIODevice. The easiest way would be to do something like this: QIODevice* device; QNetworkReply* reply = manager.get(url); connect(reply, SIGNAL(readyRead()), this, SLOT(newData())); and...

How to map a resource file in QT 4.5?

Is it possible to map a resource in QT 4.5? For example: QFile file(resource_name); file.open(QIODevice::ReadOnly); uchar* ptr = file.map(0, file.size()); When I try this, ptr == 0, indicating an error. It works fine if I try to map a regular file. I am running qt on linux, which supports QFile::Map. ...

In qt 4.5, is it possible to have resources in a statically linked plugin?

I have a custom QT plugin module that has embedded resources. I want to statically link this plugin with an application: LIBS += -lstatic_plugin_with_resources In the application I am using the Q_IMPORT_PLUGIN() macro, which allows the application to use the plugin; however the plugin can not access its embedded resources. Using the...