qt-designer

Adding Qxt plugin to Designer

Hey guys, I'm having a problem with adding the Qxt library to Qt Designer. The error it gives is: Cannot load library C:/Qt/4.6.2/plugins/designer/QxtDesignerPlugins.dll; The specified module cannot be found. Any ideas on what the problem is? ...

Select text of QLineEdit on focus

Hi, I have created a dialog using qt designer. There is a QLineEdit object in the dialog with some default content. When dialog initializes focus goes to the QLineEdit, I want the default content to be auto selected so once user start writing previous content will be overwritten. Thanks, GG [EDIT] { in constructor } dialog->accept(); ...

Auto-expanding layout with Qt-Designer

I'm using the Qt Designer. I want to create a QVBoxLayout which will automatically expand to fill the whole window. The layout of the QVBoxLayout remains fixed. How can I cause the QVBoxLayout to expand and fill the entire window through the designer? ...

How do I add a Phonon VideoPlayer to QtDesigner form?

I can add a player object to my UI layout in the MainWindow constructor, but how do I use the widget container as a placeholder so I set properties and layout for the VideoPlayer in QtDesigner? ...

QT 4.6: Animating widgets within a QStackedLayout

I am designing a GUI interface in QT Designer. Part of this interface involves two custom widgets stacked on top of each other via a QStackedLayout. When certain actions are performed elsewhere in the GUI, I want the top stacked widget to slide upwards, revealing the widget beneath it and covering whatever happens to be above it. I am c...

How to implement MousePressEvent for a Qt-Designer Widget in PyQt

Hi, I've got a Widget (QTabeleWidget, QLabels and some QButtons). It was build in Qt-Designer. And now I have to implement some things. For that I need the mousePressEvent. Usually I would write a subclass and write something like this: def mousePressEvent(self, event): if event.button() == Qt.LeftButton: print "left"...

PyQt: Right to left controls

I need my all controls to be right aligned. so when resizing they should move with the right upped corner of window instead of left upper. In visual studio, I simply set the Anchor property of any control to right and up. but PyQt has no Anchor or Dock property. Setting layoutDirection to RightToLeft didn't help. note: I'm trying to lea...

Setting a plain background color for a QGraphicsView widget

I'm trying to display a little square of solid color. I've created a QGraphicsView widget myGraphicsView and call: ui->myGraphicsView->setBackgroundBrush(QBrush(Qt::red, Qt::SolidPattern)); But it stays white. What am I doing wrong? ...

QToolBar: Is there a way to add QAction to a QToolBar in QtDesigner?

I've a PyQt4 Installed on Python 2.6. I wish to insert actions or widgets into a toolbar in QtDesigner instead of adding them in code, with addAction or addWidget (as simple as adding actions to a menu in design time). ...

Qt Designer; difficulty placing widgets in the right parent

Using the Qt Designer I've made a couple of QFrames in each other, each having a horizontal layout. Their stylesheet predicates that they should have no margin nor a padding. This means that in the Qt Designers view as well as in the final result, no space is seen between the QFrames. Using drag-and-drop I can place widgets into the win...

Python - Qt. How to make a Terminal Window for Telnet or ssh server interaction.

Hi, i am making a PyQt application, and i want to make something like a Terminal Window, where the user can interact with a Telnet or ssh server. My first idea was to have a Window with a black QPlainTextEdit and a scrollbar. I am new to python-Qt world and would appreciate some guidance. Any ideas? Thanks :-) ...

Qt stylesheets; color fading, 2D gradient and CSS classes

I'm having some questions about Qt's stylesheet functionality. It's really great, but it feels like the feature isn't around for too long yet, true? It's by far the easiest way to style my GUI though. Is it possible to add color fading in the stylesheets? Whenever the mouse hovers over a certain widget, I don't want it abruptly changin...

Qt: Align controls that are in separate layouts

Hello, On a form designed with Qt Designer, I have two QGroupBoxes with a bunch of controls in each of them. Both group boxes have nearly the same contents (QLineEdits with associated labels). What I want to do, however, is to align the controls together, as if they were part of the same grid layout. But since they are in separate cont...

How can I get my program looks like QtDemo?

Hello, How can I edit my program to have a look like QtDemo ? I am using Qt 4.7. Thanks ...

Qt get children from layout

Hi, I try to hide all widgets in layout. But looks like findChildren doesn't work for layout. Here's my sample code: QLayout * layout = widget -> findChild<QLayout *> (layoutName); QList<QWidget *> list = layout -> findChildren<QWidget *> (); cout << list.size() << endl; size is 0, but inside this layout I have a fe...