qt

How to make a resizeable rectangle selection tool?

I'm trying to write a very simple photo editor using C# 2008 or QT4. How to make a resizeable rectangle selection tool like the photoshop did? ...

Adding external library into Qt Creator project

How can I add external library into a project built by Qt Creator RC1 (version 0.9.2)? For example, the win32 function EnumProcesses() requires Psapi.lib to be added in the project to build. Thanks in advance. ...

Why doesn't QCalendarWidget.setDateTextFormat(QDate(), ...) work?

I'm using PyQt 4.4.3. I've got this code, which should clear all formats in the QCalendarWidget: cal.setDateTextFormat(QDate(), QDateTextFormat()) According to the documentation this should work: QCalendarWidget::setDateTextFormat(QDate &date, QTextCharFormat &format) If date is null, all date formats are cleared. QDate::Q...

bandwidth throttling with Qt

hi, I'm using the QNetworkAccessManager to download files from the web, it provides an easy API to the task. But I wish to add a download rate limit to the class, so all http replies won't exceed that limit (I see no reason to limit the requests). I've googled abit and found an interesting post here. But what it does is subclass QTcpSo...

Charting widget for GTK or QT

Is there a widget for GTK or QT that would allow me to draw stock charts like this? http://smartquant.com/openquant/openquant_chart.jpg (copy&paste the URL due to hotlinking restriction) Thanks, Joel ...

How do I deal with "Project Files" in my Qt application?

My Qt application should be able to create/open/save a single "Project" at once. What is the painless way to store project's settings in a file? Should it be XML or something less horrible? Of course data to be stored in a file is a subject to change over time. What I need is something like QSettings but bounded to a project in my appl...

QFileDialog passing directory to python script

Hi all, Im writing a little python program that goes through an XML file and does some replacement of tags. It takes three arguments, a path from whcih it creates a directory tree, the XML file its reading and the xml file its outputting to. It works fine from the command line just passing in arguments. As its not just for me, i thought...

Does anyone commit Qt to their own source control?

Does anyone commit Qt to their own source control? If so, how do you do it? Do you commit the whole Qt directory or do you pick only the ones that your application needs (bin/lib/include/src) How do you handle the case when new Qt version comes out? I'm asking because I'm trying to setup Build automation and Qt moc is a bit of a pain.....

Qt class for handling file paths

hi, Is there a class that handles file paths in Qt? Particularly I'm looking for something like .NET's Path.Combine. I know there's one in boost::filesystem but I was wondering if there's one in Qt. ...

What is the minimum amount of tweaking needed to get QClipboard::setText() to work under X11?

After recommending uclip I found out that it does not work for copying. I started debugging this, first converting from QT3 to QT4 to see if that helped, but it did not make any difference and eventually I found that it is a know bug but marked as "Won't fix": This is a side effect of setting the clipboard immediately after creating ...

Creating popup menu in Qt for QTableView

I have a QTableView in the main UI of my program. I'd like to show popup menu when user right clicks on the cells of the table and take appropriate action when an option is selected from the menu. I am using Qt Creator 1 (Qt version 4.5). How can I do that? Thanks for your time. ...

Open External Browser from QWebView

I have a "start page" on my application that is just a QWebView widget that downloads a page from my server. When the user clicks on a link I'd like it to open in their default browser, not in the widget. Is there a way to do this with QWebView? Or should I take a different approach? ...

How do I use gdbmacros.cpp in QtCreator?

I'm trying to debug in QtCreator on Linux and I get the message: The debugged binary does not contain information needed for nice display of Qt data types. You might want to try including the file .../share/qtcreator/gdbmacros/gdbmacros.cpp into your project directly. Adding ~/qtcreator/gdbmacros/gdbmacros.cpp to my ...

QTableView selected element in PyQt4

Is there some way to read which row of Qt's QTableView widget is selected by user? Does it have something to do with QModelIndex class? ...

QTreeView stylesheet customization problem with scrollbar

There are two QTreeViews in the screenshot below. For the one on the right, I've add a css customization: setStyleSheet( "background-color: #EAF5FF;" "alternate-background-color: #D5EAFF;" ); Notice however, the scrollbar appearance has changed. It went to the "windows" style, not the "windowsxp" style (which is the default,...

What language / platform would you use for a shareware / freeware desktop application?

I have a DVD cataloging application that I wrote a few years ago with MFC. Records are saved in a sqlite database, so basically it's a CRUD app. UI-wise, it has a tree view on the left, a list view (grid) on the top right, and an HTML view (embedded IE) on the bottom right. Nothing fancy. I wanted to update the app with more features, b...

Why does my QT4.5 app open a console window under Windows?

I've been playing around with Qt Creator 4.5 under Linux. My application builds just fine under Linux, but if I build in Windows, the app always opens a console window at startup. Can I stop it doing that? I'm building using the default MinGW setup, perhaps that is related. If need be I can build with Visual Studio, but I'd like to und...

/usr/bin/ld: cannot find -lfreetype Why? And how can I make it work?

Exact duplicate: /usr/bin/ld: cannot find -lfreetype qt Hi, I'm writing a cross-platform Qt application for a graduate project. I've been working with Qt 4.3, but just recently upgraded to 4.5. On my Windows machine, it works great. No problems. However, on my Linux machine, things aren't quite so nice. I'm using the Qt creator ...

How to synchronize between main and worker thread in Qt?

I have this design. I could not achieve what I need: B is inherited from A. A is inherited from QThread. My goal is restart(re-run) to "worker" thread when it has finished its task. I intend to call the worker thread destructor for this approach because, it takes memory from heap. I need to clean-up all the related variables. How c...

Show Editors for All Cells in Row in QTableView

Hello, I would like to display editors for all cells in a row when a user begins editing any cell in a QTableView. I have made several attempts but I cannot obtain the correct behaviour. The only way to open multiple editors is by QAbstractItemView::openPersistentEditor() - attempts to successively call QAbstractItemView::edit() resul...