qwidget Questions

1

I have subclassed QTreeWidget (called it ToolsSelectorWidget) and enabled reordering in it by overriding QTreeWidget::dropEvent() void ToolsSelectorWidget::dropEvent(QDropEvent *event) { QModelIn...
Ointment asked 18/5, 2018 at 22:6

3

Solved

I would like to highlight a QFrame, if one of it's child widgets has focus (so the users know where to look for the cursor ;-) using something along ui->frame->setFocusPolicy(Qt::StrongFo...
Pelasgian asked 28/12, 2012 at 15:16

2

Solved

I'm creating a new widget, by subclassing the QWidget class. I'd like to be able to set a ratio (for its height and its width) for this widget, which will always be maintained. For this, I've alwa...
Zito asked 2/5, 2015 at 17:49

2

Solved

I have (I think) a simple question but haven't had much luck trying to find an answer. Really new to pyqt! I am dynamically adding a number of QtGui.QCheckBox() widgets to a gridLayout based on a ...
Larry asked 4/6, 2015 at 19:46

3

In JavaFx I can easily add a CSS style class as follows: Scene scene = new Scene(new Group(), 500, 400); scene.getStylesheets().add("path/stylesheet.css"); ...... Label label = new Label("Cool L...
Thermoluminescent asked 7/2, 2017 at 17:29

2

I have a base class which has some gui items that i have set positions of using the designer in Qt creator. Those items are: QWidget* w1; QWidget* w2; QWidget* w3; Now in a class that inherits t...
Goudy asked 13/2, 2016 at 16:55

1

Solved

I want to select an arbitrary amount of items from a list of arbitrary length. A dropdown (QComboBox) doesn't allow checkable items. A list of checkable items would become clumsy with a lot of item...
Welloiled asked 18/1, 2018 at 17:56

1

Solved

There is a table: tab=QTableView() sti=QStandardItemModel(parent=None) sti.appendRow([QStandardItem(str(1)),QStandardItem(str(2)),QStandardItem(str(3)),QStandardItem(str(4))]) tab.setModel(sti) ta...
Gisborne asked 6/11, 2017 at 15:7

1

Solved

I am trying to learn PyQt vector painting. Currently I am stuck in trying to pass information to paintEvent() method which I guess, should call other methods: I am trying to paint different number...
Commissar asked 25/10, 2017 at 14:2

4

Solved

How to set QWidget width? I know setGeometry(QRect& rect) function to do that, but in that case I should use geometry() function to get former parameters of my QWidget, then I should increment ...
Mays asked 3/6, 2010 at 14:40

5

Solved

I am using Qt5 beta and trying to embed a QWidget-based object into QML. The goal is to use QML as much as possible, and only use QWidget objects where QML does not do what I need. I found a link e...
June asked 22/10, 2012 at 15:14

1

Main Question What is the "right" way to give your widgets default sizes and make sure they contract, expand, or remain fixed if there is additional or not enough space to accommodate them? How I...
Galeiform asked 14/7, 2016 at 20:23

4

Solved

I have a QTreeWidgetItem added to a QTreeWidget: QTreeWidgetItem* item = new QTreeWidgetItem(ui->trwPairs); item->setFlags(item->flags() | Qt::ItemIsEditable); If the item is edited, I ...
Bobbi asked 27/8, 2012 at 17:9

1

Solved

This is an repost. I am kind of new in QtDesigner and wanted to do something about the uglyness of just some buttons. All i have done yesterday was looking on the internet on how to change the ba...
Whitman asked 7/4, 2017 at 16:21

1

Solved

I create a simple UI with Qt Designer and convert it to Python codes. I searched for any method to detect changing window size. This is the generated code : from PyQt5 import QtCore, QtGui, QtWid...
Yolandayolande asked 30/3, 2017 at 19:23

1

Solved

In one of my projects I'm using a QTableWidget in order to display some complex computational results. In order to increase the readability of the table I'm in need to display two aligned values in...
Delete asked 30/3, 2017 at 8:40

1

Solved

I have QWidget instance (with other QWidgets inside) in Qt 5.8 and I want to set some border around it. Is there some way to do this from C++ without affecting any of it's children and their settin...
Wideangle asked 19/3, 2017 at 18:15

2

Solved

My main application object is a QObject, that juggles a QSystemTrayIcon, a QDialog, a QWindow and a few other components. The app mostly sits in the tray, with some options dialogs etc etc. Now, I...
Breechblock asked 18/10, 2009 at 20:50

2

Solved

in my project i use a EventFilter for widgets, that are in a QHBoxLayout. If i clicked on an a widget, i want to draw a transparent overlay with blue color over the clicked widget. Is there a way ...
Hickox asked 5/10, 2013 at 16:15

2

I have two buttons on my QMainWindow. One to btnShowKb and another btnHideKb. When i press btnShowKb it shows an QWidget. I want this QWidget always to be on top of all windows till I press btnHide...
Restricted asked 10/2, 2011 at 0:50

1

Solved

Let's assume I want to create a dialog box, a child of my main program: from PyQt4 import QtGui, QtCore class WizardJournal(QtGui.QDialog): def __init__(self, parent): super(WizardJournal, sel...
Arterial asked 20/6, 2016 at 8:42

0

I have a Qt Widgets application using Qt styleSheet for the app look and feel. We want to add support for high-DPI displays, as on these, the app looks very small. The first step was thus to call: ...
Ambsace asked 20/6, 2016 at 12:10

1

Solved

I'm trying to draw an icon(.png) inside a QWidget with QPainter::drawPixmap() : QPixmap _source = "/.../.png"; painter.setRenderHint(QPainter::HighQualityAntialiasing); painter.drawPixmap(rect(),...
Kweichow asked 27/4, 2016 at 15:26

2

Solved

I am fairly new to Qt (PyQt - PySide). I am trying to build a custom widget which is a menu. However I have hit a hard road and I can not seem to be able to sort myself out. I've read the documenta...
Trondheim asked 30/12, 2012 at 14:45

2

Solved

I can add shadow to widget: QGraphicsDropShadowEffect *bodyShadow = new QGraphicsDropShadowEffect; bodyShadow->setBlurRadius(9.0); bodyShadow->setColor(QColor(0, 0, 0, 160)); bodyShadow->...
Sharpnosed asked 18/5, 2014 at 5:23

© 2022 - 2024 — McMap. All rights reserved.