QMessageBox::about( this, "About Application",
"<h4>Application is a one-paragraph blurb</h4>\n\n"
"Copyright 1991-2003 Such-and-such. "
"For technical support, call 1234-56789 or see\n"
"<a href=\"http://www.such-and-such.com\">http://www.such-and-such.com</a>" );
This code is creating the About message box which I wa...
Please tell me how to create a QLabel on the QWidget that has a text that you can click and browser will open the mentioned link.
Please bring here a code snippet.
Thanks!
...
Hi..
I have a class inherited from Qwidget, now in that class I will be creating "Qlistview" object and filling up the items to view..
When the selection of items in the listview gets changed I want to get the "selectionchange" event to come..
So how can I achieve this.. pls tell me in brief...
thanks
...
Is there a way to force QtCreator to recompile all the resources (images / qss files) i have specified in my qrc file every time i build the project?
Currently if i change some styles in my qss file but dont remove the file and re-add it to the qrc file the old version of my qss file is used.
Thanks.
...
I would like to build a static version of QT Library for X11 like shown in the doc Deploying an Application on X11 Platforms but I am stuck at the first step.
where it says :
cd /path/to/Qt
./configure -static -prefix /path/to/Qt
make sub-src
1) Where is the path/to/Qt. Is this a path to libs or executables or what? In /usr/bin...
I currently have this code:
// Construct query
QString const statement = QString("drop database if exists %1")
.arg(databaseName_);
QSqlQuery query(db);
query.exec(statement);
Is there a better way to code than the above?
Specifically, I dont like how I use QString for SQL statement. It'd ...
Hi..
Can any one tell me how to set the item to be selected forcefully..
I tried this after adding items to list row..
QModelIndex index = mylistview->currentIndex();
mylistview ->setCurrentIndex(index);
its not working.. index I am getting index (-1,-1)..
can any one help me on this
Thanks
...
Hi there. I'm using Qt 4.6.2 and i have problem with QCSS. I have own Q_PROPERTY(QFont myFont READ myFont SET setMyFont). I want to change it with QCSS but it doesn't work. I've tried using normal font syntax but it doesn't work. I've also tried few other combinations like:
qproperty-myFont:
font(serif 20 1 0)
font(serif 20 bold)
QFont(...
How can I set a label in Qt Ui forms.
...
class myslot
{
public:
Q_OBJECT
myslot()
{
}
~myslot()
{
}
typedef enum Emycars{volvo,benz,tata}cars;
public slots:
void hellowslot(myslot::cars);
};
void myslot::hellowslot(myslot::cars cars1)
{
}
class mysignal
{
public:
Q_OBJECT
public:
mysigna...
How can I make calendar not select any date but focus should be on calendar?
...
I'm new to Python and am starting to teach myself GUI programming (hopefully) using PyQT4.7 and Python 2.6
I just downloaded the whole PyQT/QT4 package (including QTDesigner) from the PyQT website, however it seems QTDesigner, which looks amazing to use as a newbie (since you can see all the attributes/properties/defaults etc) of each w...
Please consider we have a menu which has text set "MyMenu" and I want to change the menu text by clicking a button in the same widget from "MyMenu" to "МойМеню". Could you bring a code snippet please for that operation?
...
Hi, I have a QMainWindow displaying a QDialog:
CalibrationDialog d(this);
d.exec();
My QMainWindow class has a signal:
signals:
void PenOn( QPoint p );
And QDialog has a slot:
public slots:
void on_PenON( QPoint p );
I tried connecting PenOn event to on_PenOn in two ways:
After instantiating QDialog
void MainWindow::on_a...
Hi, I am using
QStackedWidget to switch between the views, I will be able to traverse between the views,
I am facing problem in some scenario, where I do not require the widgets, I want to remove them completely..
QStackedWidget provides the functionality to remove widgets, still the ownership of the widget will be there, I mean widget ...
I can find no non-deprecated way of hiding an item in a menu bar in Qt4.
This post: http://qt.nokia.com/developer/faqs/585 gives a method that uses deprecated Qt3 compatibility functions.
Is there a better way?
...
What is the best starting point for a Qt4 widget for entering Latitude/Longitude in DD:MM:SS format (degrees, minutes, seconds)? Customize a QLineEdit? A series of spin boxes?
...
Is there any other way to change the QTextLayout of a QTextBlock that is within a QTextDocument without having to subclass QAbstractTextDocumentLayout and call its documentChanged? I know that on a call to QTextBlock::layout() const ; "the returned QTextLayout object can only be modified from the documentChanged implementation of a QAb...
is there a way to change the background color of a QTextBlock in a QTextDocument without using a subclass of QAbstractTextDocumentLayout. I have tried many ways and the effects are null. I am trying from the textCursor() method of a QPlainTextEditor and it seems practically everything is const.
...
Hi,
i am trying to operate the listview itesm through keyboard focus, its not moving.. can you folks suggest where i am wrong.
if i click on the listview from mouse, listview is gaining the focus. i dont no what is wrong.
class Newlist : public QWidget
{
public:
Newlist(QWidget *parent = 0);
~Newlist(){};
public:
QListVi...