qdialog

QDialog with rounded corners have black corners instead of being translucent

别等时光非礼了梦想. 提交于 2020-01-25 07:04:03
问题 I need to create a QDialog with rounded translucent corners. The problem is when doing so, the corners are translucent, but are somehow filled in by the Window's alpha property making it black (which is my understanding of the cause of the problem) Clearly visible is the rounded edges, but with a black 'background' of sorts. To confirm, this Dialog is a modal dialog launched by a QThread from QMainWindow . It is not the parent window . The CSS for the QDialog (root) component is: QDialog {

Qt folder browser opening more than once

别说谁变了你拦得住时间么 提交于 2020-01-16 05:14:20
问题 I have a Qt GUI app, and i have a button to browse for an output folder. But there is a bug i cannot figure out. When you launch the app and click the browser button it works fine and you can close it, etc. Then if you click the button a second time, a browser window opens and you can select the folder, but this time when you close it, the window immediately reappears a second time. And if you repeat this, it will make you close it 3 times, 4 times, etc. I have been unable to see why this is

Place non-modal QDialog window only on top of my application instead of all applications

无人久伴 提交于 2020-01-15 06:27:27
问题 I have a QDialog window that should always be on top of my application. It is NOT modal. The user can interact with the dialog and the main application at any time. Using WindowStaysOnTopHint accomplishes this to some degree. However, the dialog remains on top of all other running applications as well (ex. notepad, chrome, etc.). This can be annoying when constantly switching between applications. I would like the QDialog to be on top of my application and no others. Any suggestions would be

how to restart an application in qt?

做~自己de王妃 提交于 2020-01-14 09:42:07
问题 I do this works for restarting my game but program has error .I want to show a QDialog when user losses .In this QDilag i put two pushbutton for retry and exit.also i have a QDialog for beginning of game.Where is my mistake? (I read similar questions and do according these but yet i have problem) extern int const EXIT_CODE_REBOOT; mydialog_end::mydialog_end(QWidget *parent) : QDialog(parent { retry=new QPushButton(this); exit=new QPushButton(this); retry->setText("RETRY"); exit->setText("EXIT

how to restart an application in qt?

这一生的挚爱 提交于 2020-01-14 09:41:34
问题 I do this works for restarting my game but program has error .I want to show a QDialog when user losses .In this QDilag i put two pushbutton for retry and exit.also i have a QDialog for beginning of game.Where is my mistake? (I read similar questions and do according these but yet i have problem) extern int const EXIT_CODE_REBOOT; mydialog_end::mydialog_end(QWidget *parent) : QDialog(parent { retry=new QPushButton(this); exit=new QPushButton(this); retry->setText("RETRY"); exit->setText("EXIT

QMessageBox blocks QDialog

别来无恙 提交于 2020-01-13 17:55:29
问题 I don't really know how to formulate my question this time... I have my application with a QDialog as a main window. The application is getting different values like temperature, humidity and so on from a remote machine. For development I added a group box with different widgets to simulate these values. I have different limits for throwing warnings and alarms to the user. For example if temperature rises over 30°C then I open a QMessageBox with the request time (the application does polling

QDialog closing on it's own, how can i fix it?

旧时模样 提交于 2020-01-11 12:10:10
问题 My class names is like (what it does)_(type) for example: reg_QDialog Here is code of an executing dlg and if Accepted creating QMainWindow: if(log_dlg->exec() == QDialog::Accepted) { find_wnd = new find_QMainWindow(); find_wnd->show(); } log_dlg has 2 btns: "Enter" (here is the accept result) and "Reg" (opens a new dlg) "Enter" and "Reg" code is here: void log_QDialog::on_btn_enter_clicked() { this->accept(); } void log_QDialog::on_btn_reg_clicked() { reg_QDialog *reg_dlg = new reg_QDialog()

A blocking but non-modal QDialog?

帅比萌擦擦* 提交于 2020-01-03 16:59:28
问题 I have a stack of images on which I want to perform some operations. After processing each image, my program should pop up a dialog to prompt the user if they want to proceed with the next image or to abort. Before that, they should have an opportunity to do some manual changes either on the images or on the parameters. Anyway, they must have access to the windows of the applications, while the execution of the method that called the dialog should be blocked until the dialog is closed. I

PyQt: Accesing Main Window's Data from a dialog?

社会主义新天地 提交于 2020-01-02 06:54:05
问题 So, I'm using Python and PyQt. I have a Main Window that contains a QTableWidget, and a dialog that opens modally and has some QLineEdit widgets... All right so far, but I have 2 problems: When the dialog opens, my Main Window freezes, and I don't really like that... What I want, when I finish editing a QLineEdit, is that the program will search the QTableWidget, and if the text from the QLineEdit exists in the table, a dialog will come up and informe about that. That's the general idea. But,

PyQt - How to check is QDialog is visible?

余生颓废 提交于 2020-01-01 17:08:12
问题 I have a problem. I have this code: balls = [Ball() for i in range(1, 10)] So, when I say Ball() this will draw a ball on QDialog. And then when this is done, I am moving the balls around QDialog in an infinite loop. I want to say something like while QDialog.isVisible() move them around . I don't have any parent dialog or form or any child dialog or form. It's all just about this QDialog . I know that it's stupid to do with QDialog , but I am not allowed to use anything else than just