qt

Legal to sell qt application?

would it be legal to sell a qt/c++ application (lgpl) without buying a license? And would doing the same but with pyqt(GPL) be legal? If it's not, should I explicitely tell the customer (It's an specific application for only a few customers) It's license, I don't think he/she would understand a thing. And I guess we will install the soft...

How to provide data from PySide QAbstractItemModel subclass to QML ListView?

I have an app I'm writing in PySide that has a QML UI. I have subclassed QAbstractListModel in Python: class MyModel(QtCore.QAbstractListModel): def __init__(self, parent=None): QtCore.QAbstractListModel.__init__(self, parent) self._things = ["foo", "bar", "baz"] def rowCount(self, parent=QtCore.QModelIndex()): ...

Qt Creator - How to write the UI?

Hi, I'm beginner to Qt and I see that most of widgets that are build in in Qt do not appear in the widgets tool box. How can I add all the widget to tool box? (Like QSystemTrayIcon that does not appear by default in tool box) what is the best way to write gui - by the designer - ui file or by code - cpp file? Thanks! ...

Compiling C code, does not see a #define'd constant

Greetings. I am trying to compile a 8hz mp3 encoder - C code in QT Creator. In a file l3psy.c that starts like this #include <stdio.h> #include "types.h" #include "error.h" #include "layer3.h" #include "l3psy.h" #include "fft.h" #include "tables.h" The build step complains about PI being undeclared here for(i=0;i<BLKSIZE;i++) wi...

How can I access a modified QLabel?

I am instantiating an editable QLabel like so: QLabel foo("some text"); foo.setTextInteractionFlags(Qt::TextEditorInteraction); I can click the text and modify it, and the modified text must be in a buffer somewhere, but even after examining the data fields in Qt Creator I don't see where it is: QString notmodified = foo.text(); // o...

Memory Management in Qt

HI all, I have small doubt about Qt memory management, Lets take an example of Listview, in listview we add each item by allocating memory dynamically. So in this case do we need to delete all the “new”ed items manually.. Eg: Qlistview *list = new Qlistview; QStandardItemModel *mModel = new QStandardItemModel(); list ->setModel(mMode...

is there is a config file in qt?

is there is a config file in qt? ...

How to anchor QGraphicsView to a special point on a scene?

How to anchor QGraphicsView to a special point on a scene? I want a center of a view is anchored to the scene point (0,0). But as said in docummentation: If the whole scene is visible in the view, (i.e., there are no visible scroll bars,) the view's alignment will decide where the scene will be rendered in the view. And i...

Updating QT version of OpenSuse

Hi All, I'm using OpenSuse 11.2 which has QT 4.5.3. Can I update it's QT to version 4.6? if yes, how? Thanks... ...

qt QWidget click

Hello, I have my own class based in QWidget. I put this widget in QMainWindow and i need catch mouse click on this widget. I try: connect(my_widget,SIGNAL(clicked()),this,SLOT(exit(0))); But nothing happening. How can i do it? Thank you ...

Draw with QPainter

Hello, I need draw with QPainter, but when i try to do it not in void paintEvent(QPaintEvent *) I catch error: QPainter::setPen: Painter not active QPainter::setBrush: Painter not active Can i use qpainter not in void paintEvent(QPaintEvent *) ? Thank you. ...

Difference between qt and PyQt4

Well I am new to Qt and found its easier to work with python , I dont know how far its true . but some of the code snippets have import qt and some have import PyQt4 I don't know what the difference is, when I tried to interchange them I did get some errors , like some function was not recognizable and so on, also I am tryi...

Qt:How to tell Qmake to include ws2_32 in visual studio project

Hello all im using some third party lib in side Qt application but i like the *.pro file and the QMAKE to be the default . how can i tell qmake (what to write in the *.pro file ) to include in my visual studio project the windows ws2_32 socket lib in the include lib dir ? ...

Layering components with QT

I am using QT Creator to develop a small GUI app. I have a GraphicsView component which spans the entire window. My question is, how can I place other widgets (such as transparent buttons) ontop of it in each of the four corners of the application. Also, how can I make sure that the lower right hand components get resized properly so tha...

Qt Build w/ DLLs Included

In Qt when I build a project it creates the executable but it doesn't include the necessary DLLs. Is their some option I can turn on to do this for me? ...

add Qt to existing Visual Studio c++ project

hey there! I've got an existing Visual Studio c++ project. It creates a mainwindow using GLUT and got a right-click menu (also using glut) all I want to do now is to open a second window used as property inspector to display and change some values. Everyone recommends using Qt for GUI stuff - but all the tutorials I find regard either...

what is the media player uid in symbian^3 (N8 device)

in my application,i just wanna open a url contain media,e.g. http://www.test.com/test.mp3,or rstp://www.test.com/test.3gp,so i need the symbian embeded media player's uid to open it. ...

How to properly determine that the end-of-input has been reached in a QTCPSocket?

I have the following code that reads from a QTCPSocket: QString request; while(pSocket->waitForReadyRead()) { request.append(pSocket->readAll()); } The problem with this code is that it reads all of the input and then pauses at the end for 30 seconds. (Which is the default timeout.) What is the proper way to avoid the long timeo...

Qt Documentation Standards

I am looking for some help regarding documenting code in Qt. For instance, when I am developing on the XNA platform I use XML notation with tags such as summary, params, etc. What does Qt have and what are some standards. In addition, I am looking for something that will work with documentation generating applications (such as Doxygen),...

painting by mouse click in qt

Hello, I have a class Square based in QWidget, it's game board consisting of rectangles 8x8. I draw this rectangles in my widget in: void Square::paintEvent(QPaintEvent *) Now i must click on some rectangle and in this rectangle must draw ellipse. I try: void Square::mousePressEvent(QMouseEvent *e) { if (e->button() == Qt::LeftB...