qt

How to open an URL in a QTableView

What is the best way to present a clickable URL in a QTableView (or QTreeView, QListView, etc...) Given a QStandardItemModel where some of the columns contain text with URLs I'd like them to become clickable and then handle the click by using QDesktopServices::openURL() I was hoping there would be some easy way to leverage QLabel's tex...

Real life use for Qt (outside of Nokia)

Is Qt an interesting platform for business apps development, outside of Nokia phones ? Why ? Strong points ? Thanks ...

QTableView selectionChanged

I have a QTableView that I need to get the selectionChanged event from. I can't seem to get the connect working. I have: MyWidget.h ... protected slots: void slotLoadTransaction(const QItemSelection & selected, const QItemSelection & deselected); private: QTableView table; ... MyWidget.cpp ... connect( table->selectionModel()...

Qt Dropsite Example

In QtDemo there is an example called Dropsite in which an image can be dragged and dropped into the field to be displayed. This example used to work in an older version of Qt and works initially in 4.6 if you run it from qt\examples\draganddrop\dropsite\release folder. But if you load the project file into Qt Creator and recompile it, it...

How to detect a USB connection in linux/Qt

hi all, i am extremely new to both qt and linux , can u please tell me a way how to detect a usb device connection and disconnection using qt in linux platform . any help , doccuments, urls/sites where i can get the basic information (in detail would be even better) is appriciated. please help thanks in advance, SAMBEET KUMAR...

pyqt QTreeWidget setItemWidget dissapears after drag/drop

I'm trying to keep a widget put into a QTreeWidgetItem after a reparent (drag and drop) using QTreeWidget.setItemWidget() But the result, if you compile the following code - is that the widget inside the QTreeWidgetItem disappears. Any idea why? What code would fix this (repopulate the QTreeWidgetItem with the widget I guess?) from Py...

Qt, GCC, SSE and stack alignment

Hi there, I'm trying to make a program compiled with GCC and using Qt and SSE intrinsics. It seems that when one of my functions is called by Qt, the stack alignment is not preserved. Here's a short example to illustrate what I mean : #include <cstdio> #include <emmintrin.h> #include <QtGui/QApplication.h> #include <QtGui/QWidget.h> ...

Using QCoreApplication::setEventFilter() in qt

I want to catch all events for the application. How can i use this method to achive this? Please help me !! ...

How to display icon in QDockWidget title bar?

My QDockWidget has window title and close button. How do I put icon in title bar? When I select icon from my recources for QDockWidget WindowIcon property, it's not working either. Any ideas? ...

ComCtl32.dll Version 6 with Qt

I'm trying to implement a balloon tip. By following the instructions on this page: http://msdn.microsoft.com/en-us/library/bb760252%28VS.85%29.aspx I managed to implement the balloon, but the balloon is not using the appropriate theme under Win7. I read somewhere else that for the balloon to use the right visual style, ComCtl32.dll Ver...

Is Qt 4.6 compiled with Cocoa by default on Snow Leopard?

At work, I was told to configure and build Qt 4.6 with the cocoa flag ./configure -cocoa Instead I just ran configure without any flags on my Mac OS X 10.6 machine. Does that mean I have to reconfigure or is cocoa linked by default in Snow Leopard? Alternatively, how can I check if my Qt build is linked against cocoa? ...

QIcon inside combobox

Hello, I want to include a "remove" icon on entries in my QComboBox, but I am having trouble catching the mouse press event. I've tried to catch it on the combobox, and I've tried reimplemting the QIcon class to catch the mousepress there. No dice. Does anybody know how to do this? -D ...

QImage and its const bits() const method

Qt's QImage has two methods: uchar* QImage::bits(); const uchar* QImage::bits() const; But how to call a second one? Calling const uchar* p = image.bits(); Will call a non-const version O_O. ...

Qt creator won't run app after compiling

I checked out a Qt project hosted on google code with SVN to a local folder. When I opened it on Qt Creator, it managed to compile the project, but when it tried to run the compiled program, an error message came up on the application output: The process could not be started! What is wrong? ...

How do I set up QtDesigner for a project that has animated elements?

I'm writing a project to simulate creatures moving around a map. These can be represented by simple circles, but I need a map/grid and those circles animated on top of the map. What elements should I use in QtDesigner to set up for this kind of GUI in my project? I've yet to do anything like this before ...

How to register all selected entries from a QListView inside a wizardpage?

Hi I've got a QListView inside a wizardpage. There are several entries and multiple selection is active. I want the selected items beeing registered as a field when the 'next' button is clicked. Is it possible? And if how, cause registerfield can't work, connect() nedds an modelindex, iterating over the model-rows doesn't work in w...

QTableView has unwanted checkboxes in every cell

I'm just getting started with Qt programming, and I'm trying to make a simple tabular data layout using a QTableView control with a model class of my own creation inheriting from QAbstractTableModel. For some reason, my table view ends up looking like this: What in the heck are those things that look like checkboxes (but don't do anyt...

Linking a qtDesigner .ui file to python/pyqt?

So if I go into QtDesigner and build a UI, it'll be saved as a .ui file. How can I make this as a python file or use this in python? ...

Best way to animate a circle moving around a screen in Qt?

If I wanted to, using Qt, simply have some circles move around in a white box, or a graphic, what would be the best method of this? Would I need to draw white/the graphic behind where the circle moved from every time? Is there a simple way of accomplishing this in Qt? ...

Is there a way to receive data as unsigned char over UDP on Qt?

I need to send floating point numbers using a UDP connection to a Qt application. Now in Qt the only function available is qint64 readDatagram ( char * data, qint64 maxSize, QHostAddress * address = 0, quint16 * port = 0 ) which accepts data in the form of signed character buffer. I can convert my float into a string and send it but i...