I'm trying to set the focus from one widget to the next one using the focusNextChild() method. It works, but I there seems to be a slight difference between using the tab-key or doing things in code. If the next control is a button, using the tab-key results in a focused button with its caption surrounded with little dots, so you see imm...
I have an existing application created using Qt for the Symbian operating system and I want to port it to Windows Mobile devices.
I'm expecting some presentation differences. What additional things should I look out for?
...
I have a QDialog I am working with. It is made somewhat like a QMessageBox. I noticed that the size of the QMessageBox (and the size of its label) depends of the size of the message displayed. How would I make the size of my QDialog adjust automatically like a QMessageBox. Presently my QDialog contains a button box, a label and the Q...
Does anyone know if/how one would be able to set a background color for the whole window of a Qt application? So far I am using stylesheets but can only figure out how to assign a background color to a widget such as QGroupBox or QPushButton. Basically, if I want a black background how would I make it seamless without any borders of the ...
I have a QToolBar on which there is a QToolButton. When QToolButton is pressed by mouse click then it perform some action. The same action is performed when space bar is pressed. I dont want the action to be fired on space bar press, but I want it on mouse click. How I can do this?
...
I have a normal QTreeView, a custom QAbstractItemModel and a custom QSortFilterProxyModel.
I've reimplemented QSortFilterProxyModel::filterAcceptsRow to filter items from my model in the way I want, however now I want those filtered items to be expanded in the treeview.
The obvious solution was to emit a signal from QSortFilterProxyMo...
Hello
I am using the Mfc to Qt migration solution, to migrate my Mfc plugin to Qt.
My Mfc plugin is loaded in third party Mfc app. Basically I am using the following example Qt based Application Extension :
BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID ) {
static bool ownApplication = FALSE;
if ( dwReason == DLL_P...
I considered using tmpnam to set the output file name of a QPrinter. But the Python documentation recommends against using it.
os.tmpnam()
Return a unique path name that is reasonable for creating a temporary
file. ... Applications are responsible
for properly creating and managing
files created using paths returned by
t...
Hi,
Pardon me, I am a newbie :)
Is it possible in Qt to create a custom window without borders but still draggable without holding down the Alt Key? I created a borderless window but in order to be able to drag it (on Linux) you have to hold down the alt key.
I was planning to create a window with rounded corners. Any one have any ide...
I have some buttons on a tabwidget. These buttons need to have some icon on top of them.
I am aware of QPixmap that will allow me to put an image on top of a button, but I see that these constructors take a filepath as a parameter. I want to avoid dragging icons around in a file after I build. I would like to embed these icons in the ex...
I'm in a scenario when I have to terminate a thread while the thread is running according to user action on GUI. I'm using Qt 4.5.2 on Windows. One way to do that is the following:
class MyThread : public QThread
{
QMutex mutex;
bool stop;
public:
MyThread() : stop(false) {}
void requestStop()
{
...
Which windowing system for embedded linux supports hardware overlay?
Is it possible to add hardware overlay support in Qt for embedded Linux?
...
I want to access a MySQL database and I want to read+write data from+to the database within my Qt/C++ program. For the read write process, I try to use QSqlTableModel, QSqlTableRcord and QSqlDatabase as this is a very pleasant approach without too much of SQL commands which I dislike for the one or other reason (to handle myself).
I got ...
Dear All,
first I apologize for the probably silly question. I am having trouble with QT.
I have a table widget with four columns; I want the user to be able to insert only
integers in the first three and a double in the fourth.
I believe that this can be done with delegate, but I have not found relevant
examples (only some with QDateT...
I'm trying to write a paint program (paint where ever a mouse press/hold is detected), but I'm having trouble using the Qt QPainter. I have read the documentation on their web site and I'm still kind of lost. A link to a tutorial that isn't on their web site would be nice or maybe explain to me how I can accomplish this in Qt. The only t...
So let's say I do something like this:
QIcon myIcon(":/resources/icon.ico");
How can I later determine the path for that icon, e.g.
QString path = myIcon.getPath();
The problem is, there is no getPath() member. And I can't find anything similar, but surely there must be a way! :(
I guess I could inherit the QIcon class and add thi...
I try to style a QScrollBar via a custom QStyle but if i draw nothing in drawComplexControl for the QScrollBar, the required space for the scrollbar on the parent widget is painted black. If i do the same with, eg a QToolButton simply the toolbutton is not painted but there is no black rect on the widget. That is what i would expect.
But...
Hi I am developing a Qt application that uses a plugin (dynamic library) and I was wondering if there was a way I could build the application and library in one file (maybe using the QResource feature?)
...
For those of you who haven't been reading my Qt questoins, I am learning Qt for a project. I have only limited experience with GUI design at all, and not in Qt.
I've got a horizontal layout that I want to populate with some buttons. I can feed these buttons in just fine, but my formerly-square buttons are stretched horizontally to take ...
I managed to get a QPushButton to open a new window when pressed by using the following code (just snippets of code):
AppDialog::AppDialog(QWidget *parent)
: QDialog(parent)
{
QPushButton *button3 = new QPushButton(tr("Apps"));
QHBoxLayout *hLayout = new QHBoxLayout;
hLayout->addWidget(button3);
setLayout(hLayout...