import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import Qt
class PopupMenu(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle('Пример всплывающего меню')
self.resize(300, 300)
self.label = QLabel(self)
self.label.setText("МЕНЮ")
self.popup_menu = QLabel(self)
self.popup_menu.resize(180, 100)
self.popup_menu.setText("Hello PyQt5!")
self.popup_menu.setStyleSheet("border: 2px solid grey; font: 75 italic 16pt Verdana;\
text-align: center; border-radius: 10px;\
background-color: lightblue; width: 10px;")
self.popup_menu.hide()
hbox = QHBoxLayout()
hbox.setAlignment(Qt.AlignCenter)
hbox.addStretch(2)
hbox.addWidget(self.label)
hbox.addWidget(self.popup_menu)
self.label.installEventFilter(self)
def eventFilter(self, obj, event):
# Если мышь над виджетом
if event.type() == 10:
self.popup_menu.show()
# Если мышь покинула область виджета
elif event.type() == 11:
pass
return False
if __name__ == '__main__':
app = QApplication(sys.argv)
window = PopupMenu()
window.show()
sys.exit(app.exec_())
mainWindow = new BrowserWindow({
resizable: true,
width: 1200,
height: 55,
icon: __dirname + '/img/logo.png',
autoHideMenuBar: true,
frame: false,
show: false
});
It is not possible to edit with mobile phones and tablets for the moment. You can only edit pages with Elementor on desktop computers.
public class Person
{
private Dictionary<string, string> prop = new Dictionary<string, string>();
public void SetProp(string key, string value)
{
prop[key] = value;
}
public string GetProp(string key)
{
return prop[key];
}
}
public void Test()
{
Person pers = new Person();
pers.SetProp("name", "Ivanov");
var name = pers.GetProp("name");
}