qt

How to draw a picture instead of the slider on Qt QSlider?

I have created a class that inherits from QSlider. I want to draw a picture on the slider (grabber) instead of showing the plain one. How to do it? -- I found an answer and posted after I had received the reply. With due respect to the responder, I will choose that reply. However, I'd like to share code so that anyone with the same iss...

how to capture an image from the window mobile device using Qt?

I'm trying to capture an image from the window mobile device using Qt. Is there the APIs in Qt-wince to access the camera in the window mobile device? ...

Using Qt in a pre-existing x-platform project?

I have an existing cross platform project that runs on Mac, Linux and Windows. Now, I want to add a 'native' UI to it - the ability to show some popup windows (to request user credentials) and perhaps FileOpen dialogs. By native I mean I want to use the systems build in file-open dialog - so on the Mac the mac file finder is shown and ...

OpenCV with QT on Maemo 5 (N900)

Since the presentation by Eero Bragge at theAmterdam devdays about QT / QT-Creator I've been looking for an excuse to try my hands at mobile development. Now this excuse has arrived in the form of the Nokia N900, my new phone! My other hobby is computer vision, so my first Idea's for applications to try and build lie in that direction. ...

Can you install Qt-4.6.0-wince successfully?

I'm trying to install Qt-4.6.0-wince on XP and Vista. I read the instructions and follow it to install. However, I can't install it successfully due to some fatal errors on all of the two machines. I think the problem is that qconfig.[h cpp] files are not created automatically during the configuration. I already report about this probl...

Setting focus on QLineEdit while showing the QListView view

In Qt, there is a QCompleter class which provides auto-complete funtionanity. I want to use QListView to finish the same thing. In the following code, When the QListView shows, QLineEdit will lose focus. How could I keep QLineEdit's focus? 1) mdict.h: #include <QtGui/QWidget> class QLineEdit; class QListView; class QModelIndex; class...

Eric4 dark theme stylesheet

Does anyone use Eric4 and has taken the time to create a dark themed stylesheet (.qss or .css)? Surely, not everyone uses the default theme. I wish Eric4 made this easier to configure through their preferences settings. Thanks! ...

Can QSignalMapper be used to re-emit signals with multiple parameters?

Is it possible to use QSignalMapper to re-emit signals with multiple parameters? I have found a workaround but im curious to know if it is possible. example: take void QLineEdit::textEdited ( const QString & text ) [signal] and re-emit: void newSignal(int group, int pos); ...

How to update QCompeter's model dynamically

I use QCompleter with QLineEdit, and I want to update QCompleter's model dynamically. i.e. the model's contents are updated according to QLineEdit's text. 1) mdict.h #include <QtGui/QWidget> class QLineEdit; class QCompleter; class QModelIndex; class mdict : public QWidget { Q_OBJECT public: mdict(QWidget *parent = 0); ~...

Integrating Qt GUI code into C#

I have to develop a plug-in for an external program using C#. I am an experienced Qt/C++ programmer and the core of the plug-in is programmed in C++. My first idea was to program GUI in C#, which write settings to a text file and then call the core C++ code, as an external process, with this textfile as an input. However I also noticed...

Non-standard windows with QT

It is possible to create a non-standard window with QT??. I mean, I want to create an application with round-corners windows and buttons with aqua-like effects. The principal thing is that the app must to be beautiful, no compliant with any Windows or Mac GUI reference... Can QT does that thing, or is preferable other toolkit? ...

Custom UIs in C++ with Qt?

Coming from C#, I've decided to learn C++ with the Qt framework. I have one question though, what is the "correct" way to accomplish an UI like this one? This may be kind of subjective, but I'm sure that stacking image labels on top of each other isn't the right way. ...

reading from file certain lines at a time in c/c++

Hello, So i have a gui, designed using QT, c++. I have large amount of data in a text file that I would like to read in this fashion: load first 50 lines, when the user scrolls down load next 50 lines and so one. When the user scrolls up load previous 50 lines. Thank you. ...

How to cross compile qt application for different platforms.

How can I cross-compile my application on Qt. As for each project I need two version 1). Which runs on computer on Qvfb & i386 Architecture 2). Which runs on device with Linux Framebuffer & ARM Architecture I have already compiled Qt for device as well as for Qvfb. I am able to run examples on both platforms, But How can I cross-co...

how to have a virtual onscreen keyboard in qt for embedded linux?

how to have a global virtual onscreen keyboard in qt for embedded linux? ...

Getting MouseMoveEvents in Qt

In my program, I'd like to have mouseMoveEvent(QMouseEvent* event) called whenever the mouse moves (even when it's over another window). Right now, in my mainwindow.cpp file, I have: void MainWindow::mouseMoveEvent(QMouseEvent* event) { qDebug() << QString::number(event->pos().x()); qDebug() << QString::number(event->pos().y())...

Argument type for Qt signal and slot, does const reference qualifiers matters?

For signal and slot of below type signals: void textChanged(const QString &); public slots: void setText(const QString & text) the type of argument of textChanged and setText seems to work invarable of const and &. Does the constant and reference qualification make any difference compared to just using QString ? QObject::co...

QPushButton & shortcut

Hey everyone, I have a problem with Qt 4.6.0 and shortcut for QPushButtons : I want to display a special text in a QTextEdit when the user clicks a button, but only when the button is pressed, as soon as it's released, i want another text to come up. Everything works fine but now I want to add a shortCut (let's say F1) to perform the ...

PyQt 4 UI freezes

The following programm should just count up and int and displays its value in a label. But after a while the GUI stops working, while the loop continous. from PyQt4 import QtGui,QtCore import sys class main_window(QtGui.QWidget): def __init__(self,parent=None): #Layout QtGui.QWidget.__init__(self,parent) ...

How do I embed a binary executable (to be executed at runtime) in a Qt program?

I'm writing a cross-platform C++ program using Qt and I want to package/embed a number of binary executables within the program. The program should be able to execute these binaries at runtime. I figured, I would need QResource and QProcess using start() and the ":/..." notation, but I don't seem to get the process running. Is there any...