Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Qt reject funktion

Empfohlene Antworten

Veröffentlicht

hallo community,

Ich habe zur Zeit folgendes Problem:

Ich habe ein login fenster das Eine Standartmäßige Loginabfrage macht. Wenn diese abfrage Positiv ist wird ein normales Fenster geöffnet. Soweit so gut funktioniert dies auch alles bis auf eine Sache die Negative Ansteuerung mit beenden. Dies hab ich zu erst mit reject probiert, dort wird das fenster das bei einer positiven ansteuerung auf gehen soll nicht angezeigt und das eigentlioche fenster schließt sich. Eigentlich alles so wie es soll doch nur anscheinbar denn der Prozess läuft weiter und Verpullvert dadurch unnötige Resourcen. Hier meine MiniMain:

#include <QtGui/QApplication>

#include "login.h"

#include "mainwindow.h"


int main(int argc, char *argv[])

{

    QApplication a(argc, argv);

    login w;

	MainWindow c;

    w.show();

	if(w.exec())

	{

		c.show();

	}

    return a.exec();

}

hier die connects:
	connect(cancel, SIGNAL(clicked()),

			this, SLOT(cancelSLOT()));

	connect(ok, SIGNAL(clicked()),

			this, SLOT(PwAbfrage()));
und der cancelSLOT: nur geschrieben weil reject net funkionierte aber auch das funzt net
void login::cancelSLOT()

{

	this->reject();

	this->close();


}

Vieleicht habt ihr ja ne idee oder bessergesagt habt schon dieses Problem gehabt

hab herrausgefunden das es nicht am reject liegt sondern am exec() . Nur frage ich mich warum. Dies verhindert an sich doch bloß die interaktion mit anderen fenstern bis das eig geschlossen wurde

aha k hab gedacht das er dort 100% rein muss da es fürs erste fenster auch zu trifft. Aber zum glück nur totaler denk fehler. Naja thx 4 help. Sollte heute abend wohl nix mehr machen. Kommt nix produktives mehr raus nur noch dumme fragen :D

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.