Questions tagged [qframe]

QFrame is a class from the Qt Toolkit which provides the base class for widgets that can have a frame.

Documentation can be found here (Qt4) and here (Qt5).

75 questions
1
vote
1 answer

QFrame is not taking QWidget as parent?

what i am trying in here is Make CancelCross child of Notifier class but when i do that the cross of CancelCross is not visible. But if i unparent it then it visible fine. I tried parenting it with QMainWindow as well but no luck. Is there something…
laslavinco
  • 344
  • 4
  • 14
1
vote
1 answer

Dynamic QFrame display

i'm trying to have PyQt5.QtWidgets.QFrame updating dynamically his color. Here is the code ( watch run() method ) import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import QFont from time import sleep,time from random import…
1
vote
1 answer

How to make a qframe highlight when cursor is on it in PyQt4?

I have the following window with frames. I want frame to be highlighted (in my case change its shape) when mouse is in its area. from PyQt4 import QtGui, QtCore import sys app = QtGui.QApplication(sys.argv) window = QtGui.QWidget() window_layout =…
eodj
  • 25
  • 5
1
vote
2 answers

Qt - render QFrame with image as background without using WA_TranslucentBackground

I need to set a QFrame with a background image: https://i.stack.imgur.com/2I3aG.jpg. This is what I tried: setAutoFillBackground(true); setWindowFlags(Qt::FramelessWindowHint); setStyleSheet("background: transparent;"); QPalette p =…
SexyBeast
  • 7,913
  • 28
  • 108
  • 196
1
vote
1 answer

PyQt4: restrict stylesheet to parent

So, first off, I've already read this, and everything I can find online says the same thing. To restrict the scope of a stylesheet setting do this: self.setObjectName( self._TAG ) self.setStyleSheet( "#{} {{ background-color:{}; }}".format(…
orodbhen
  • 2,644
  • 3
  • 20
  • 29
1
vote
1 answer

Limit the usable space in a QFrame

I have a class derived from QFrame. I need to paint something in the bottom area of the QFrame by subclassing paintEvent. This class is then the base class for other classes, which put layouts and widgets on the frame. How can I avoid derived…
Maxxximo
  • 25
  • 4
1
vote
1 answer

Extending QFrame in custom class

I want to create my own custom widget that extends a QFrame, however when I am trying to make the constructor I get an error. #ifndef CONTROLFRAME_H #define CONTROLFRAME_H #include #include #include #include…
dominicbri7
  • 2,479
  • 4
  • 23
  • 33
1
vote
1 answer

QGraphicsBlurEffect degrades the performance?

I am developing GUI in Qt5 with animation on QWidgets and QFrames, I have set blur effect on QFrame as I set QFrame as a parent of few of my QWidgets and I set QPropertyAnimation on QWidget which increases and decreases its size depending upon…
1
vote
2 answers

Custom checkable / toggleble QFrame widget

How can I make a custom widget (derived from "QFrame") contain a support to be checkable/toggleble? How to make Qt's stylesheet (CSS) to be aware that my widget was checked/toggled by user? Is there some kind of signal or property that I need to use…
Gediminas
  • 1,830
  • 3
  • 27
  • 47
1
vote
1 answer

Is it possible to use one QFrame several times?

I am using a QWidget in which I would like to put some separator lines. As separator lines I am using this QFrame *seperatorLine = new QFrame(_toolBar); seperatorLine->setFrameStyle(QFrame::Sunken | QFrame::VLine); I need several separator lines…
liquid.pizza
  • 505
  • 1
  • 10
  • 26
1
vote
2 answers

How to make QGraphicsView Flat?

How can I make QGraphicsView look flat? It looks like this: I don't want the outline to be shown. Thanks!
iTayb
  • 12,373
  • 24
  • 81
  • 135
0
votes
0 answers

PyQt5 QFrame not adjusting size when QLabel has word wrapping

I have a QFrame with a vertical layout and 2 QLabels: one for an image (on top) and one with actual text (on bottom). When I have the text QLabel word wrap, it takes up more space (as it should), but the parent QFrame does not expand/resize to…
GayZach
  • 1
  • 1
0
votes
0 answers

How to call paintEvent in a Qframe PyQt5?

In pyqt5, I want to insert a circular bar in my QFrame named days. For that, I have painted a circular bar but I am unable to call it under a Qframe. In the last two lines, I am trying to call it under a frame but somehow it doesn't work. I would…
saman naz
  • 53
  • 12
0
votes
1 answer

Style a QFrame with CSS depending on the frameShape in Qt 6

Using the Fusion style, both a QFrame with a HLine and VLine frameShape set are displayed as a 1px black line. Up to Qt 5.15, the appearance could be changed with style sheets. E.g. this made such a QFrame a gray line: QApplication application(argc,…
Tobias Leupold
  • 1,512
  • 1
  • 16
  • 41
0
votes
0 answers

How to over lay a QFram onto a QGridLayout?

I want to overlay my QFrame(Draw several lines) onto a QGridLayout, to show some lines connecting some grids on the layout. But I can't find my lines with following code. QHBoxLayout *basicLayout = new QHBoxLayout(parent); QVBoxLayout…
Yy Lee
  • 1