I have a class that inherits QMainWindow and I just want it to have a webview widget and nothing else,
so here's what I tried doing for constructor:
MyWindow::MyWindow(QWidget *parent) : QMainWindow(parent)
{
this->_webView = new QWebView(this);
this->setCentralWidget(this->_webView);
}
This didnt work do I have to use some k...
Using a QListView, and QStandardItemModel, is it possible to display icons in the list view without displaying the associated text? QStandardItem is defined as so:
QStandardItem ( const QIcon & icon, const QString & text )
So it seems to require a text string of some sort - I only want the icon displayed. If I use the following co...
Hello every one,i would like to know if we have any class in qt which can zip a folder or file.i used qprocess to compress,it got compressed but i am unable to uncompress it using normal zip tool.can anyone let me know how can we compress a folder/file using qt api classes
...
I have a webservice that I need to POST some data to using Qt.
I figured that I can use a QByteArray when POSTing to the web service.
My question is, how can I format this array in order to be parsed correctly at the other end?
This is the code I have so far:
// Setup the webservice url
QUrl serviceUrl = QUrl("http://myserver/...
I want the filter in a QFileDialog to match all audio file types supported by Phonon on the platform in question.
1 - However I am not able to find a way in Qt to use mime types in a filter. How can I do that?
2 - Or how can I find the corresponding file extensions for the mimetypes manually? The solution should be Qt based, or at leas...
i'm trying to get computer's state in my LAN...
thought about using QTcpSocket but it's not realy effective since port also should be inserted as:
socket->connectToHost("hostName", portNumber);
if (socket->waitForConnected(1000))
qDebug("Connected!");
can anyone demonstare me a better way to check if computer is responding ?
...
How do I hide the private implementation (implicit sharing) in Qt:
I have Employee.cpp the following in my Employee.h header:
#include <QSharedData>
#include <QString>
class EmployeeData;
class Employee: public QObject
{
Q_OBJECT
public:
Employee();
Employee(int id, QString name);
Employee(const Employee &other);
...
I was wondering if anyone has experience with maintaining a Qt application on Visual Studio (2008+) that has both Win32 (32-bit) and x64 (64-bit) platforms?
The default Qt project comes with only the 32-bit library. While I know how to build Qt as 64-bit, how do you setup Visual Studio, Qt, etc such that you can easily switch between th...
How do I copy data from a Qstring list to a text file for later retrieval?
Is it possible to do this in Qt?
How to put a newline character into a text fiel using QFile I did like this
QFile data("output.txt");
if (data.open(QFile::Append ))
{
QTextStream out(&data);
out << fileDet[i];
data.putChar('\n');
}
...
There is a tool - http://qt.nokia.com/doc/qtopia4.2/qtopiacore-qvfb.html#skins which allows to use predefined skins. But i cant find tool for skin generation. Does it exists or skins should be created manually.
...
i want to put a newline into a txt file, i tried with many alternative with so many help from this forum but i am getting always unknown character always. Please help
for(int i=0;i<fileDet.size();i++)
{
qDebug()<<"Name directory"<<fileDet.at(i);
QFile data("output.txt");
if (data.open(QFile::Append )) {
QTextStream out(&data);...
Hi, I am naive to Qt and GUI programming.
http://stackoverflow.com/questions/1357960/qt-jpg-image-display/2605463#2605463
The procedure given for displaying an image is working fine and thank you for providing that. But I want to display an image when I click on radiobutton.
I created a slot, and I connected the button click event t...
I thought that layout is just a widget that keeps more widgets inside.
But now I find that I can't add it to other widgets using addWidget.
For instance how to add a layout to QSplitter?
...
I'm trying to simply save a file. However, I need a filename entered without a suffix to automatically get a default suffix (which setDefaultSuffix() does).
I'd rather not completely lose the native save dialog just for this. exec() is not overloaded from QDialog, so it totally bypasses the native hook (ignoring the DontUseNativeDialo...
My Google skills must be failing me today.
I've inherited from QTreeView to create a TreeView that stores a QStandardItemModel instead of a QAbstractItemModel. I have also inherited from QStandardItem to create a class to store my data in an item as is necessary.
I've successfully inserted my derived QStandardItem into my derived QTree...
I'm trying to trigger a signal when a double click happens in one of the draggable widgets on the fridge magnets example. Here's the changes I made to the example source:
DragLabel:
class DragLabel : public QLabel
{
public:
DragLabel(const QString &text, QWidget *parent);
QString labelText() const;
public slots:
void testS...
I've run into some odd behavior with tabified QDockWidgets, below is an example program with comments that demonstrates the behavior.
Is this a bug or is it expected behavior and I'm missing some nuance in QDockWidget that causes this?
Directly, since this does not work, how would one properly "undock" a hidden QDockWidget then display...
There is a python module called "_Qt". PyQt is not what I want. I was wondering if there was any documentation for the _Qt module installed with python as a standard module. I have a mac.
...
Hello world,
I have a table view with three columns; I have just passed to write into text file using this code
QFile file("/home/hamad/lesson11.txt");
if(!file.open(QIODevice::WriteOnly)) {
QMessageBox::information(0,"error",file.errorString());
}
QString dd;
for(int row=0; row < model->rowCount(); row++) {
dd = model->item(...
I have an table view showed
part description, quantity, price
And I have a Model/View using this code
model = new QSqlRelationalTableModel(this);
model->setTable("parts");
model->setRelation(3,QSqlRelation("part_tbl","part_id","part_desc"));
model->select();
ui->tableView->setModel(model);
I need to add a new column that shows qua...