qmainwindow Questions
3
Solved
Im designing a Pyside Qt application and I want to toggle the QtCore.Qt.WindowStaysOnTopHint window flag in my main window. Setting this hint using this code works fine:
self.setWindowFlags(QtCore...
Phratry asked 3/1, 2014 at 1:46
5
from PyQt5 import QtWidgets, QtGui
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
class Application(QMainWindow):
def __init__(self):
super(Application, self).__init__()
self.setWindo...
Nf asked 4/3, 2017 at 23:46
3
Solved
I'm trying to get the screen position of QMainWindow and print the position (x,y) values. I have tried both self.pos() and self.mapToGlobal(self.pos()) and both of these return 0.
import sys
from ...
Peculiar asked 9/11, 2018 at 23:2
6
Solved
I found an example to set borders on a frameless window, however it's not draggable. How can I make a frameless window draggable? Especially if I can see an example it'll be awesome. Here is my exa...
Careworn asked 9/6, 2016 at 6:26
3
Solved
How can i add two child Widget objects in equal portion of QMainWindow.
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{ TreeArea *ta= new TreeArea(this);
TreeArea *ta1= new Tree...
Gooden asked 15/2, 2012 at 9:26
4
Solved
I'm new to Qt, so I wonder whether there is a way to set the size of a QMainWindow to (for example) 70% of the user's desktop.I tried the stretch factor but it didn't work. QWidget::setFixedSize wo...
Choline asked 29/4, 2013 at 13:47
2
Solved
The QMainWindow below is assigned a dark-gray background-color using QSS.
I would also like to change the color of the borders and the color of the title bar.
How to achieve control of the appear...
Delmore asked 12/2, 2015 at 15:16
6
Is it there a way to set a QMainWindow to be non-resizible in Qt Designer? I am seeing lots of coding examples but I want to do as much UI customization in Qt Designer as I can. So far I can only g...
Tjaden asked 5/11, 2013 at 5:43
3
Solved
// main.cpp
#include <QApplication>
#include "mainwindow.h"
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
MainWindow* window = new MainWindow();
window->show();
r...
Narcose asked 25/2, 2011 at 11:5
2
I use a subclass of QDockWidget with a little trick. The "topLevelChanged" signal is connected to this member slot :
void MyDockWidget::updateWindowFlags(bool topLevel)
{
if (topLevel == true)
{...
Bugbee asked 22/6, 2017 at 18:56
2
Solved
I use python 3.4 , pyQt5 and Qt designer (Winpython distribution). I like the idea of making guis by designer and importing them in python with setupUi. I'm able to show MainWindows and QDialogs. H...
Seavey asked 29/11, 2016 at 13:16
4
Solved
If I run this code:
#!/usr/local/bin/ python3
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class Window(QMainWindow):
def __init__(self):
super().__init__()
self.button...
Decaffeinate asked 29/7, 2013 at 1:54
6
I have been having problems adding a menu item to the built in menu bar in a Qt desktop application. I copied the code provided in the QMainWindow class reference documentation for creating a menu ...
Wellwisher asked 12/8, 2014 at 10:15
4
Solved
I have this example code:
QDialog *dialog = new QDialog(this);
QPoint dialogPos = dialog->mapToGlobal(dialog->pos());
QPoint thisPos = mapToGlobal(this->pos());
dialog->exec();
But t...
Hughs asked 19/2, 2017 at 6:36
2
Solved
I understand setCentralWidget is required in QMainWindow implementation, and at first sight, it seemed extremely self-explaining what central widget means. But is there a more strict definition of ...
Harris asked 18/2, 2019 at 14:13
1
Solved
I've created aQMainWindow with menubar and 4 dockable widgets. First dockwidget contents multipletabs, second is Qpainter widget, third is Matlabplot and fourth is pdf report.
When I run the code...
Scabbard asked 7/10, 2018 at 23:12
2
Solved
I have a QMainWindow that I initialize with a QWidget. I want that each Time I'll press the button New In my QMainWiindow, it will open the QWidget temporarily (in my case, until mouse button relea...
Bina asked 1/8, 2018 at 14:7
3
Solved
I want to update my QMainWindow step by step. I use sleep method but I cannot see changes. I want to see changes every 3 seconds.
void MainWindow::updateScreen()
{
ui->pushButton1->show();
...
Frascati asked 3/8, 2018 at 9:46
1
Solved
I'm trying to display a picture in a QMainWindow class:
from PyQt5.QtWidgets import QLabel, QMainWindow, QApplication
from PyQt5.QtGui import QPixmap
import sys
class Menu(QMainWindow):
def __...
Eudemonics asked 19/7, 2018 at 19:38
1
Solved
I read the Qt Documentations, I checked out a couple examples provided with the SDK, I build Qt Creator from source to see how the Qt devs do it...still no luck.
I am developing a cross platform a...
Nimbostratus asked 21/12, 2016 at 1:4
1
I'm trying to increase padding between widgets contained within a QMainWidget and the edges of the QMainWidget. You can see the problem in the image below:
There is no padding between QTabWidget...
Tahr asked 13/1, 2015 at 15:53
4
Is there a signal that tells when 'show' function finishes?
I have a problem in my code: If I write:
QMainWinObj.show();
QMainWinObj.someGuiFunc();
the code doesn't work. But, if I write:
QMai...
Ericerica asked 8/4, 2013 at 16:22
1
Solved
I am still working on the GUI for my Database and now i have a different error:
Traceback (most recent call last):
File "G:\Python\Database Kast Thuis\PyQt Test\MainMenu_ui.py", line 84, in <...
Gery asked 6/4, 2017 at 16:17
1
Solved
Okay, I am jumping from Tkinter to PyQt, because PyQt is just so much more advanced, and nicer to work with. BUT! I am having some troubles here.
I am trying to change the GUI layout after I press...
Perot asked 22/12, 2016 at 19:1
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 Next >
© 2022 - 2025 — McMap. All rights reserved.