Questions tagged [qtwidgets]

Questions related to the QtWidgets module in Qt 5 that provides a set of UI elements to create classic desktop-style user interfaces.

The widget set of UI elements was put into its own module to keep Qt Gui modularized and less cluttered for GUI application using Qt Quick and so on.

The official documentation of this module can be found here.

Tagging recommendation:

You will often see questions tagged specifically as for QWidget, et cetera because the question is Qt 4 related even though it is about widget classes. From Qt 5 onwards, please try to use this tag for those cases. Make sure that you only tag questions with that contain questions about the core part of Qt Gui.

300 questions
0
votes
0 answers

QTableWidgetItem::setText segmentation fault

I have this piece of code: temp = ui->barsTable->item(i, 1)->text().toUInt(); if (temp > ui->nodesTable->rowCount()) { QTableWidgetItem* bla = ui->barsTable->item(i, 1); /*ui->barsTable->item(i, …
dimas
  • 13
  • 7
0
votes
1 answer

Qt - Embed an ActiveX Control

I am developing a new Qt application and I need to embed in it a third party ActiveX Control; I spent the last days learning about Qt Quick Controls 2.0, but I fear that ActiveX Controls can only be embedded in Qt Widgets applications. Is it…
Brutus
  • 790
  • 3
  • 10
  • 27
0
votes
0 answers

Telegram like widget/dialog shadow?

I'm not newbie in Qt framework, but would like to have my app to have Telegram like shadow effect, can somebody guide me. PS Is there anybody that analyzed UI part of Telegram source code. I've tried but it seems confusing. Can you help me?
elgolondrino
  • 665
  • 9
  • 33
0
votes
1 answer

Qt theme and colors disturbed when built using cmake

I have a Qt application (Qt5) on linux which runs (and looks) perfectly fine. I have developed this using Qt Creator and so it gets built with the help of qmake by default. But when I use cmake to build this project, the colors of all the widgets…
Krish
  • 45
  • 1
  • 8
0
votes
1 answer

Not Responding when using PyQt

I just began to learn PyQt5 in python and the window which opens becomes not responding import sys import PyQt5 from PyQt5 import QtWidgets from PyQt5 import QtCore x=QtWidgets.QApplication(sys.argv) y=QtWidgets.QWidget() y.show()
Nimish Bansal
  • 1,719
  • 4
  • 20
  • 37
0
votes
1 answer

PyQt5 5.8.2 QLineEdit has no attribute 'setPlaceHolderText'

I'm trying figure out whats wrong with my PyQt5 install, I've looked at all the documentation and I should be able to use placeHolderText and setPlaceHolderText() but it doesn't look like it does. The QtWidgets.QLineEdit() works and shows up on my…
pulsair
  • 1
  • 3
0
votes
1 answer

How to map the QListWidget / QStandardItemModel item to my logic?

Quick question Is there an easy/quick way to map a QListWidget or QStandardItemModel (for QListView) item to my application logic? Complete Question Note: I will use undistinctly both QListWidget or QListView and itsQStandardItemModel. From my…
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85
0
votes
1 answer

How to set max width for QTreeView resizeColumnToContents?

I'm using QTreeView::resizeColumnToContents(int column) but if even after that I'm doing something alike if (t->columnWidth(0) > 10) { t->setColumnWidth(0, 10); } it doesn't work, how can I set max width there?
cnd
  • 32,616
  • 62
  • 183
  • 313
0
votes
0 answers

How to move out widget from QStackedWidget by dragging it off?

What the best way to implement dragging widget off from my custom stacked widget? QVBoxLayout* vBox = new QVBoxLayout(); QHBoxLayout* topBox = new QHBoxLayout(); QLabel* m_caption=new…
Juriy
  • 63
  • 1
  • 7
0
votes
0 answers

Qt crash when drawing, even though in GUI thread

I think I'm having a problem similar to the one in Qt crash when redrawing Widget, and switching to Qt::QueuedConnection fixed the problem. However, in my case, both the signal emitter and received are always in the same thread (the main thread). I…
OregonGhost
  • 23,359
  • 7
  • 71
  • 108
0
votes
1 answer

QTextEdit changes control characters

I've encountered some feature in Qt widgets QTextEdit, QPlainTextEdit, etc that I wouldn't like to encounter. And I actually have no idea how to change this issue. I want to cipher some text, replacing one unicode character with another unicode…
0
votes
2 answers

how set a qt widget subproperty with StyleSheet

I would like to set the QT QDockWidget DockWidgetClosable property using a StyleSheet . However it's is inside 'features' property. How can I change it using stylesheets? I tried it without success. For instance. QDockWidget{ …
Daniel Santos
  • 14,328
  • 21
  • 91
  • 174
0
votes
0 answers

How to read flash content of a webpage?

I am developing an application using web engine and Qt. I have an URL and I need to read the flash player contents of this web page for our input to transfer it on other. How can I read it (library, class)?
monu
  • 27
  • 1
  • 9
0
votes
1 answer

Custom QOpenGLWidget and GLEW include

Sorry if this is a very basic question, but I'm confused: I'm using Visual Studio and I'm creating a custom QOpenGLWidget class (by inheriting from the base class), and my problem is as follows: If I add #include in my custom…
Farzad
  • 1,770
  • 4
  • 26
  • 48
0
votes
3 answers

qtreeviewprivate.h : no such file

I have a problem with Qt 5.5 and QTreeView. qtreeview.h (Yes, it's from Qt folder) has compiler error: fatal error: QTreeViewPrivate: No such file or directory. My Qt5.5 library doesn't know about QTreeViewPrivate, but qtreeview.h needs it. Every…
Paolo
  • 104
  • 4