qt

Performance issue with QGraphicsScene::createItemGroup

I'm using the Qt graphics API to display layers in some GIS software. Each layer is a group, containing graphic primitives. I have a performance issue when loading fairly large data sets, for example this is what happens when making a group composed of ~96k circular paths (points from a shapefile): The complete callgrind dump is here...

Can I use a QTimer to periodically refresh a form while still letting user edit some of the fields?

I have a form in which I want to periodically refresh its values(mostly labels but 2 comboboxes and 1 spinboxe). I have done this before with a QThread but this time I would like to do it with a QTimer. Would that be ok or would it potentially create problems like freezing the GUI. There are a couple of fields in the form that are bo...

Qt: How to show icon when item selected

I have a QListWidget containing items which have icons and when the items are selected the icon is just highlighted out. Is there a way to prevent this? I can't use stylesheets because it's for an embedded application and including them takes up too much space. thanks ...

Qt or Symbian C++?

I am planing to develop on Symbian systems but I am not familiar with it. I know (might be) the most popular way of developing on Symbian is Symbian C++, and I also heard of Qt. What's the difference between them? If I want my app run on most of the Symbian systems, which should I choose? Can someone give me some overall advices? Thank ...

bring the application from in focus, by clicking the icon of corresponding application

Hello All, I was surprised this doesn't happen automatically, but I would like my applications window to be in focus as I click its dock icon, when in minimized mode. Just to clarify, when I minimize the app, the window goes to dock, but when I click the its corresponding Dock Icon, the window don't come in focus. Is there anything I ...

Qt, making UI that shrinks and expands

I'm trying to learn how to create the layout of my Qt Symbian application so that it will expand/shrink and fit into the screen size of different devices. In my default ui I have added a QTabWidget with five tabs that I want to fit into the screen of the device. I have two problems: How can I make the tabs to shrink to always fit into...

QT Com programming

Greetings: I am new to QT, I want to use WMI classes in QT to get access to it, I actually want to create a system restore point using QT. here is the code which I want to use using QT i.e. Set SRP = GetObject( "winmgmts:\.\root\default:Systemrestore" ) CSRP = SRP.CreateRestorePoint( "Hacked the registry", 0, 100 ) Thanks in advance. ...

QAbstractItemModel - checking when an item is in view

Say I want to implement a QTreeView that would show the (hierarchical) model of the file system. This model would be populated dynamically, and I would like to keep in-memory data at a minimum. Naturally, any collapsed folders would not be populated (and I would de-populate them when they are collapsed). But - there might be some folde...

Lock error while running program in Qt/C++

I get the following error messages,while running programme in Qt/c++ Semop unlock failure Invalid argument Semop lock failure Invalid argument Does somebody know,why this messages come? ...

Inheriting from a container with non-virtual destructor

I'm trying to use forward declarations and d-pointers to eliminate some include dependencies. Everything is working well, except that I have used XList typedefs for readability in many places (e.g: typedef QList<X> XList). The workaround for the typedef forward declaration issue is to use inheritance: class XList : public QList<X>{};. ...

Qt Styles: How to style a widget that uses a .ui generated class?

In my .qss file I'd like to specify the background color of my widget that makes use of the generated class from the .ui file like: #ifndef SPLASH_H #define SPLASH_H #include <QWidget> #include "ui_SplashView.h" class Splash : public QWidget { Q_OBJECT public: explicit Splash(QWidget *parent = 0); signals: public slots: privat...

Marvell C++ compiler (for Windows CE) for building Qt

Hello, I was able to build Qt 4.5 for Windows CE (ARM4VI) using MS VisualC++ compiler. Now, I am trying to compile Qt 4.5 for Windows CE 5.0 using Marvel C++ compiler v 2.2 (former Intel C++ compiler for XScale architecture) for achieving some performance benefit. It seems, that this compiler not officially supported for building Qt by ...

Strange QT application behavior

Hello! I'm developing a QT application with QTCreator (and QT 4.5.3) on Arch Linux. I'm using KDE 4.3 The project is basically a GUI that let you insert a url and make some web requests to give the user some data back. The web requests are asynchronous. I've encountered a weird problem. If I start the application the first time and cli...

How do you handle a QSpinBox that can be edited by both the user and the program?

my Form has a spinBox who's value can sometimes be refreshed by the program in the background but can also be edit by user. How should I handle this? ...

Using a Qt-based DLL in a non-Qt application

Am I doing it right? A client of mine has a group where I'm developing Qt-based client-server stuff with a lot of fun widget stuff and sockets. Another group within the company wants to use a wrapped version of the QTcpSocket-based client data provider classes. (Which does basically what it sounds like, provides data from the server t...

Should I use QCoreApplication::processEvents() or QApplication::processEvents()?

I have a method which is called from both QThreads and the main thread. this method can sometimes take a long time to do its computations in a loop so I put QCoreApplication::processEvents() and this prevents the GUI from freezing. At some point I had changed QCoreApplication::processEvents() for QApplication::processEvents() but that ...

Qt4: Read Default mimeData from QAbstractTableModel

By default, the QAbstractTableModel class has a mimeData() function that returns a QMimeData object which has it's data set as an encoded QModelIndexList (see here). I would like to unpack this data in an overloaded dropMimeData() function, but can't figure out how to convert this QMimeData back into a QModelIndexList. I tried the obviou...

How to prevent an icon being highlighted?

I have a listwidget with items which have icons. When the item is selected both the text and the icon are highlighted. My problem is that when the icon is highlighted it just goes entirely black because I'm using only two colours. Is there a way to prevent the icon from being selected? ...

is it possible to use QtConcurrent::run() with a function member of a class

I cant seem to be able to associate QtConcurrent::run() with a method (function member of a class) only with a simple function. How can I do this. With a regular function I cannot emit signals and its a drag. Why would anyone find this a better alternative to QThread is beyond me and would like some input ...

Qt show() function after hide(), worked when the window inactive but not active

Hi, I have made a simple qt program that grabs a picture and display it using QPainter/QPaintEvent widget. I make it on QPainter so that I can put a X mark on the picture from a user input. I have made the program window to hide and show based on an external button input. It works well if I set the running program window inactive. But if...