Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove help button from debug window #1335

Closed
wants to merge 1 commit into from
Closed

Remove help button from debug window #1335

wants to merge 1 commit into from

Conversation

chrstphrchvz
Copy link
Contributor

@chrstphrchvz chrstphrchvz commented Oct 21, 2018

Closes #547

Adapted from this SO answer, but I don't know if this is the right way to do so.

I have not tested this commit since I do not have Windows build environment set up. Can anyone volunteer to test it?

Edit: @barton2526 has offered to test this

Copy link
Member

@iFoggz iFoggz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending @barton2526 windows test

@barton2526
Copy link
Member

Test shows no change in Windows GUI 😦

issueunresolved

@chrstphrchvz
Copy link
Contributor Author

This attempt really was a guess, I wasn't sure at all it was going to work since I'm not familiar with these specific parts of Qt or C++, so maybe to someone with more C++ Qt knowledge they might have a better idea (@barton2526 suggested tagging @skcin). The answers I had found online for turning off the help button tend to be using the setWindowFlags() setter on a specific window then using show(), whereas I haven't seen any examples doing this from a subclass. Nor have I even seen any examples that set a subclass' constructor's Qt::WindowFlags f parameter's default values to anything other than 0 or Qt::WindowFlags().

@chrstphrchvz
Copy link
Contributor Author

Not sure if any similar wallet programs have already found a solution for this, the only ones I use are for Gridcoin and Curecoin. The Bitcoin core wallet has since switched away from using QDialog for the debug window, but that looks like it would be a more involved change for Gridcoin to similarly adopt.

@denravonska
Copy link
Member

denravonska commented Oct 31, 2018

What about this method? https://stackoverflow.com/a/49905954

QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton)

Edit: nvm, that's globally.

@iFoggz
Copy link
Member

iFoggz commented Aug 21, 2019

The help (Qt::WindowContextHelpButtonHint) is default placed if I remember correctly. However if you specify the window flags it will not be added as you specify the windows conditions. I believe what should of been done was something like this:

RPCConsole::RPCConsole(QWidget *parent) :
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint),
ui(new Ui::RPCConsole),
historyPtr(0)

If you were to add the "Qt::WindowContextHelpButtonHint" then it would show again.

edit:

Figure out which window flags we need and set it accordingly

@jamescowens
Copy link
Member

@iFoggz You want to pick this up?

@iFoggz
Copy link
Member

iFoggz commented Oct 5, 2019

if i have someone to compile the windows exe and test it since i have no windows machines in my house lol

@@ -206,7 +206,7 @@ void RPCExecutor::request(const QString &command)
}
}

RPCConsole::RPCConsole(QWidget *parent) :
RPCConsole::RPCConsole(QWidget *parent, Qt::WindowFlags f) :
QDialog(parent),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with @barton26 help a similar test with iFoggz@39f1087 . The issue I see here is QDialog(parent), whould be QDialog(parent, f), this should make this work or u can just do what the commit shows instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants