qt4

how to create window that opened when close main window??

Hi everyone .. Iam a absolute Beginner in QT.. i am trying to create window that has only text and one push button when you press it, you will get another window that has menu for program .. but Unfortunately, i didn't know how can i create new window and connect it with main window! so, i need to helping you ...

Memory leak detection tool for qt applications on windows

Hi, Is there any free memory leak detection tool for QT programs to run on windows? I am using QtCreator as my IDE. If any plugin or add-on is available with QtCreator its best also. Has anybody any idea about this? ...

Include QT file problem in Visual Studio 2008

When I type #include <QObject> it complains that it couldn't find file. but if I type #include <QtCore\QObject> It works properly. I moved VS2005 to VS2008, this was not the case in VS2005, and it started with VS2008. Why am I getting this error? ...

Getting QT to respond to power-events (sleep/hibernate)

I'm trying to develop software that is intelligent wrt sleep events (cleanly closing network connections, making sure data restart locations are set properly, etc). Are there mechanisms in QT (4.6) currently that facilitate me responding to system power events? ...

Get updated size of QGraphicsView

Hi, In my Qt Application I am dynamically creating QGraphicsView(s) and adding them inside a QGridLayout. When I add first view inside grid, the view covers all the available space inside grid. Then I add second view and there are now two equally sized views inside grid. Then I add third view and there are now three equally sized views ...

Modify an object without using it as parameter

I have a global object "X" and a class "A". I need a function F in A which have the ability to modify the content of X. For some reason, X cannot be a data member of A (but A can contain some member Y as reference of X), and also, F cannot have any parameter, so I cannot pass X as an parameter into F. (Here A is an dialog and F is a slo...

How to check whether value in QTable widget changed

HI, I have some data there in my tablewidget and it is editable. My intention is to take data from edited row and column. IS it possible. Is it possible to check the edited row and column. Any specific signal is there? ...

Row and column position after itemChanged signal on QTablewidget

HI, I want to get the changed datas row and column position after the signal void QTableWidget::itemChanged ( QTableWidgetItem * item ) please help ...

C++: FFMPEG and SDL resources

I'm looking for resources (preferably books, but websites are fine too) for using FFmpeg and/or SDL with C++. Stuff I'd like to be able to do (eventually): Decode and play videos in realtime to a QT widget (the QT part isn't a problem) Overlay text and images on the video (in realtime) Loop video Cross-fade from one video to another (...

Can't get flat QToolButton with border on hover stylesheet

Hi, all! I need to implement textbox with inplace button (for search or filter purposes). So, I need to get Qtoolbutton, that is flat and rendered as icon, and obtain the border when hovered by mouse or pressed. And maybe I'd add some almost transparent background on hover too. I tried to set the following stylesheet: 'border: none;...

Visual C++ doesn't see operator<< overload

I have a vector class that I want to be able to input/output from a QTextStream object. The forward declaration of my vector class is: namespace util { template <size_t dim, typename T> class Vector; } I define the operator<< as: namespace util { template <size_t dim, typename T> QTextStream& operator<<(QTextStream& out, const ut...

How do I add controls other than buttons/actions to toolbars in Qt, such as text boxes and combo boxes?

From the screenshot featured on this page http://www.kde.gr.jp/~ichi/qt/designer-manual-3.html it seems like this functionality was available in Qt3. Was it removed in Qt4? ...

How to set font Bold to a particular row in table widget

i want to set my font as bold in particular row column position of my tablewidget. I did like this but getting break. QFont font("Helvetica", 12, QFont::Bold); overviewTable->item(2,2)->setFont(font); Please Help ...

How to calculate the number of weeks in a month

Hi, I want to calculate the total no of weeks in current month. Starting from Sunday or Monday. Is it possible to do in Qt ...

Py2exe, PyQt4 and Postgre Driver (QPSQL)

Hi, I`m trying to freeze my application using Py2exe. My app uses PyQt4 and it apparently works fine with py2exe. But once I`ve uninstalled PyQt, it shows the following error: QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available drivers: QPSQL7 QPSQL Which doesn't make any sense at all. The driver is available, but I can't us...

QT 4, how do I make a QPushButton assume the maximum width it can take?

I have a QGroupBox inside a QSCrollArea. Inside my groupbox i have a vertical layout with push buttons. How can i make these push buttons get bigger and take up all the room? ...

Using C# to make Application for Maemo (convert code to QT)

Hi, I want to make an application for my phone (Nokia N900) It uses the Maemo Platform, which is a Linux variant. Most applications are made with either QT or Python, i only have experience in C#, and am wondering if it is at all possible to convert C# to QT, or would i have to use something like Mono or Vala to write the code in C# and...

Table and Image in a single page of QTextDocument in Qt4

Hi, I want to display a table and a image side by side. i.e Left side the image and right side the table. I want this because the image is the reference image for the data present in the table. I want that output in pdf. So I am using QTextDocument, QTextCursor and QPrinter to get the output in pdf. So how it is possible to display the i...

How to find the day of a Date

Hi, I want to find the day of the week of a particular date in Qt. e.g.: 1/05/2010 is Sunday. Is it possible to find the weekday using date? ...

Using sem_t in a Qt Project

Hi everyone, I'm working on a simulation in Qt (C++), and would like to make use of a Semaphore wrapper class I made for the sem_t type. Although I am including semaphore.h in my wrapper class, running qmake provides the following error: 'sem_t does not name a type' I believe this is a library/linking error, since I can compile the c...