Qt第三十四章:总结【隐藏标题栏边框、隐藏背景、窗体透明】
创始人
2024-03-27 03:39:21
0

目录

隐藏标题栏边框

①隐藏标题栏代码:

​编辑②自定义标题栏(可以直接Copy)

使用

隐藏背景

①隐藏背景代码,此时背景上的样式都是无效的。

②自定义背景,通过重写paintEvent事件来完成

中间绘制的部分是我们想要的,只需要将标题栏边框隐藏掉就可以了。 

窗体透明

①窗体透明代码,设置整个窗体的透明度

移动和缩放:隐藏标题栏边框后无法移动和缩放。



隐藏标题栏边框

①隐藏标题栏代码:

class TestWidget(QWidget):def __init__(self, parent=None):super(TestWidget, self).__init__(parent)self.setWindowFlags(Qt.Window| Qt.FramelessWindowHint| Qt.WindowSystemMenuHint| Qt.WindowMinimizeButtonHint| Qt.WindowMaximizeButtonHint)if __name__ == '__main__':app = QApplication([])main = TestWidget()main.show()app.exec()


②自定义标题栏(可以直接Copy)

# 自定义标题栏
class QCustomTitleBar:def __init__(self, window: QtWidgets):self.window = window# 默认标题栏高度 必须设self.DEFAULT_TITILE_BAR_HEIGHT = 40# 存储父类的双击事件self.mouseDoubleClickEvent_parent = self.window.mouseDoubleClickEvent# 将本类的双击事件赋值给将父类的双击事件self.window.mouseDoubleClickEvent = self.mouseDoubleClickEvent# 存储父类的窗口大小改变事件self.resizeEvent_parent = self.window.resizeEvent# 将本类的窗口大小改变事件赋值给将父类的窗口大小改变事件self.window.resizeEvent = self.resizeEvent# 设置ui文件里main_layout上边距,以免遮挡标题栏self.window.setContentsMargins(0, self.DEFAULT_TITILE_BAR_HEIGHT, 0, 0)# 1.设置无边框 和 透明背景 无边框必须设置全,不然会导致点击任务栏不能最小化窗口self.window.setWindowFlags(Qt.Window| Qt.FramelessWindowHint| Qt.WindowSystemMenuHint| Qt.WindowMinimizeButtonHint| Qt.WindowMaximizeButtonHint)# self.window.setAttribute(Qt.WA_TranslucentBackground)# 2.添加自定义的标题栏到最顶部self.title = QLabel("", self.window)# 3.设置标题栏样式self.setStyle()# 4.添加按钮# 添加关闭按钮self.close_btn = QPushButton("", self.window)self.close_btn.setGeometry(self.window.width() - 33, 10, 20, 20)# 添加最大化按钮self.max_btn = QPushButton("", self.window)self.max_btn.setGeometry(self.window.width() - 66, 10, 20, 20)# 添加最小化按钮self.min_btn = QPushButton("", self.window)self.min_btn.setGeometry(self.window.width() - 99, 10, 20, 20)# 设置三个按钮的鼠标样式self.close_btn.setCursor(Qt.PointingHandCursor)self.max_btn.setCursor(Qt.PointingHandCursor)self.min_btn.setCursor(Qt.PointingHandCursor)# 设置三个按钮的样式self.close_btn.setStyleSheet("QPushButton{border-image:url('./images/close.png');background:#ff625f;border-radius:10px;}""QPushButton:hover{background:#eb4845;}")self.max_btn.setStyleSheet("QPushButton{border-image:url('./images/max.png');background:#ffbe2f;border-radius:10px;}""QPushButton:hover{background:#ecae27;}")self.min_btn.setStyleSheet("QPushButton{border-image:url('./images/min.png');background:#29c941;border-radius:10px;}""QPushButton:hover{background:#1ac033;}")# 5.添加工具栏按钮事件# 关闭按钮点击绑定窗口关闭事件self.close_btn.pressed.connect(self.window.close)# 最大化按钮绑定窗口最大化事件self.max_btn.pressed.connect(self.setMaxEvent)# 最小化按钮绑定窗口最小化事件self.min_btn.pressed.connect(self.window.showMinimized)# 6.记录全屏窗口的大小-ps非常有用self.window_max_size = None# 7.设置标题栏鼠标跟踪 鼠标移入触发,不设置,移入标题栏不触发self.title.setMouseTracking(True)def setMaxEvent(self, flag=False):"""@description  最大化按钮绑定窗口最大化事件和事件 拿出来是因为拖动标题栏时需要恢复界面大小@param flag 是否是拖动标题栏 bool@return"""if flag:if self.window.isMaximized():self.window.showNormal()self.max_btn.setStyleSheet("QPushButton{border-image:url('./images/max.png');background:#ffbe2f;border-radius:10px;}""QPushButton:hover{background:#ecae27;}")return self.window_max_sizereturn Noneelse:if self.window.isMaximized():self.window.showNormal()self.max_btn.setStyleSheet("QPushButton{border-image:url('./images/max.png');background:#ffbe2f;border-radius:10px;}""QPushButton:hover{background:#ecae27;}")else:self.window.showMaximized()self.max_btn.setStyleSheet("QPushButton{border-image:url('./images/restore.png');background:#ffbe2f;border-radius:10px;}""QPushButton:hover{background:#ecae27;}")# 记录最大化窗口的大小  用于返回最大化时拖动窗口恢复前的大小 这个程序循环帧会取不到恢复前的宽度self.window_max_size = QSize(self.window.width(), self.window.height())def setStyle(self, style: str = ""):"""@description 设置自定义标题栏样式@param@return"""# 想要边框 加上border:1px solid #cccccc;DEFAULT_STYLE = """background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #fafafa,stop:1 #d1d1d1);color:#333333;padding:10px;border:1px solid #c6c6c6;border-top-left-radius:4px;border-top-right-radius:4px;"""self.title.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)# 设置样式self.title.setStyleSheet(DEFAULT_STYLE if not style else DEFAULT_STYLE + style)# 设置大小self.title.setGeometry(0, 0, self.window.width(), self.DEFAULT_TITILE_BAR_HEIGHT)def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None:"""@description 鼠标双击事件@param@return"""# 如果双击的是鼠标左键 且在标题栏范围内 则放大缩小窗口if a0.button() == Qt.MouseButton.LeftButton and a0.position().y() < self.title.height():self.setMaxEvent()return self.mouseDoubleClickEvent_parent(a0)def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:"""@description  窗口缩放事件@param@return"""# 最大化最小化的时候,需要去改变按钮组位置self.close_btn.move(self.window.width() - 33, 10)self.max_btn.move(self.window.width() - 66, 10)self.min_btn.move(self.window.width() - 99, 10)self.title.resize(self.window.width(), self.DEFAULT_TITILE_BAR_HEIGHT)return self.resizeEvent_parent(a0)

使用

class TestWidget(QWidget):def __init__(self, parent=None):super(TestWidget, self).__init__(parent)self.resize(400, 300)QCustomTitleBar(self)if __name__ == '__main__':app = QApplication([])main = TestWidget()main.show()app.exec()

隐藏背景

①隐藏背景代码,此时背景上的样式都是无效的。

class TestWidget(QWidget):def __init__(self, parent=None):super(TestWidget, self).__init__(parent)# 设置隐藏背景self.setAttribute(Qt.WA_TranslucentBackground)if __name__ == '__main__':app = QApplication([])main = TestWidget()main.show()app.exec()

②自定义背景,通过重写paintEvent事件来完成

class TestWidget(QWidget):def __init__(self, parent=None):super(TestWidget, self).__init__(parent)self.resize(400, 300)# 设置隐藏背景self.setAttribute(Qt.WA_TranslucentBackground)# 绘制事件def paintEvent(self, event: PySide6.QtGui.QPaintEvent) -> None:painter = QPainter(self)# 设置无边缘painter.setPen(Qt.NoPen)# 设置抗锯齿,不然边框会有明显锯齿painter.setRenderHint(QPainter.RenderHint.Antialiasing)# 设置窗体颜色painter.setBrush(QColor(50, 150, 250))# 设置绘制区域painter.drawRoundedRect(self.rect(), 50, 50)super().paintEvent(event)if __name__ == '__main__':app = QApplication([])main = TestWidget()main.show()app.exec()


中间绘制的部分是我们想要的,只需要将标题栏边框隐藏掉就可以了。
 

窗体透明

①窗体透明代码,设置整个窗体的透明度

class TestWidget(QWidget):def __init__(self, parent=None):super(TestWidget, self).__init__(parent)self.setWindowOpacity(0.80)  # 设置窗体透明度if __name__ == '__main__':app = QApplication([])main = TestWidget()main.show()app.exec()

移动和缩放:隐藏标题栏边框后无法移动和缩放。

①移动和缩放代码(​​​​​可以直接Copy) )

# 实现拖动和缩放Widget
class QWindowMoveResizeWidget(QWidget):def __init__(self, parent=None):super(QWindowMoveResizeWidget, self).__init__(parent)# 1.设置无边框 和 透明背景 无边框必须设置全,不然会导致点击任务栏不能最小化窗口self.setWindowFlags(Qt.Window| Qt.FramelessWindowHint| Qt.WindowSystemMenuHint| Qt.WindowMinimizeButtonHint| Qt.WindowMaximizeButtonHint)# 设置窗体透明度self.setWindowOpacity(1)# 设置背景透明self.setAttribute(Qt.WA_TranslucentBackground)# 默认标题栏高度 必须设self.DEFAULT_TITILE_BAR_HEIGHT = 40# 鼠标缩放窗口最小宽度,必须设self.MIN_WINDOW_WIDTH = 10self.MIN_WINDOW_HEIGHT = 10# 鼠标拖动窗口的标识self.m_flag = False# 初始化鼠标拖动标题栏标志self.drag_flag = False# 记录按下时窗口坐标, 这个用于窗口移动self.win_x = 0self.win_y = 0# 记录按下时鼠标坐标,这个用于计算鼠标移动的距离self.mouse_x = 0self.mouse_y = 0# 记录鼠标移入的拖动区域,共8种区域 左上 左 左下 上 下 右上 右 右下self.left_up = Noneself.left = Noneself.left_down = Noneself.up = Noneself.down = Noneself.right_up = Noneself.right = Noneself.right_down = None# 设置为True则mouseMoveEvent事件不需要按下也能触发,不然要按着鼠标左键或右键才能触发self.setMouseTracking(True)# 设置子类的mousetrack# self.centralwidget.setMouseTracking(True)# 记录按下时窗口的大小,用于计算鼠标相对于窗口移动的距离,用于缩放self.win_w = 0self.win_h = 0# 初始化鼠标缩放标志self.move_left_up_flag = Falseself.move_left_flag = Falseself.move_left_down_flag = Falseself.move_up_flag = Falseself.move_down_flag = Falseself.move_right_up_flag = Falseself.move_right_flag = Falseself.move_right_down_flag = False# 设置边框圆角def paintEvent(self, event: PySide6.QtGui.QPaintEvent) -> None:painter = QPainter(self)painter.setPen(Qt.NoPen)painter.setRenderHint(QPainter.RenderHint.Antialiasing)  # 设置抗锯齿,不然边框会有明显锯齿painter.setBrush(Qt.white)  # 设置窗体颜色painter.drawRoundedRect(self.rect(), 10, 10)super().paintEvent(event)def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:"""@description  窗口缩放事件@param@return"""# 最大化最小化的时候,需要去改变按钮组位置# self.titleBar.close_btn.move(self.width() - 33, 10)# self.titleBar.max_btn.move(self.width() - 66, 10)# self.titleBar.min_btn.move(self.width() - 99, 10)# self.titleBar.title.resize(self.width(), DEFAULT_TITILE_BAR_HEIGHT)# 记录鼠标移入的拖动区域,共8种区域self.left_up = QRect(0, 0, 10, 10)self.left = QRect(0, 10, 10, self.height() - 20)self.left_down = QRect(0, self.height() - 10, 10, 10)self.up = QRect(10, 0, self.width() - 20, 10)self.down = QRect(10, self.height() - 10, self.width() - 20, 10)self.right_up = QRect(self.width() - 10, 0, 10, 10)self.right = QRect(self.width() - 10, 10, 10, self.height() - 20)self.right_down = QRect(self.width() - 10, self.height() - 10, 10, 10)return super().resizeEvent(a0)def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None:"""拖动窗口"""if a0.button() == QtCore.Qt.LeftButton and self.isMaximized() == False and self.cursor().shape() == QtGui.QCursor(QtCore.Qt.ArrowCursor).shape():self.m_flag = Trueself.m_Position = a0.globalPosition().toPoint() - self.pos()  # 获取鼠标相对窗口的位置a0.accept()self.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))  # 更改鼠标图标else:"""@description 鼠标按下事件@param@return"""# 记录按下时窗口坐标, 这个用于窗口移动self.win_x = self.x()self.win_y = self.y()# 记录按下时鼠标坐标,这个用于计算鼠标移动的距离self.mouse_x = a0.globalPosition().x()self.mouse_y = a0.globalPosition().y()# 记录按下时窗口的大小,用于计算鼠标相对于窗口移动的距离,用于缩放self.win_w = self.width()self.win_h = self.height()if not self.isMaximized():# 如果按下的是鼠标左键if a0.button() == Qt.MouseButton.LeftButton and self.left_up.contains(a0.position().x(),a0.position().y()):self.move_left_up_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.left.contains(a0.position().x(),a0.position().y()):self.move_left_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.left_down.contains(a0.position().x(), a0.position().y()):self.move_left_down_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.up.contains(a0.position().x(), a0.position().y()):self.move_up_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.down.contains(a0.position().x(),a0.position().y()):self.move_down_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.right_up.contains(a0.position().x(), a0.position().y()):self.move_right_up_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.right.contains(a0.position().x(),a0.position().y()):self.move_right_flag = Trueif a0.button() == Qt.MouseButton.LeftButton and self.right_down.contains(a0.position().x(), a0.position().y()):self.move_right_down_flag = Truereturn super().mousePressEvent(a0)def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None:"""拖动窗口"""if QtCore.Qt.LeftButton and self.m_flag and self.cursor().shape() == QtGui.QCursor(QtCore.Qt.OpenHandCursor).shape():self.move(a0.globalPosition().toPoint() - self.m_Position)  # 更改窗口位置a0.accept()else:"""@description 鼠标按下移动事件@param@return"""# 获取移动后鼠标的位置mouse_move_x = a0.globalPosition().x()mouse_move_y = a0.globalPosition().y()# 计算移动的距离offset_x = mouse_move_x - self.mouse_xoffset_y = mouse_move_y - self.mouse_y# 移动鼠标时设置鼠标样式if not self.isMaximized():# 不是拖动的时才可能是缩放状态if not self.drag_flag:# 左上if self.left_up.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeFDiagCursor)# 左elif self.left.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeHorCursor)# 左下elif self.left_down.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeBDiagCursor)# 上elif self.up.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeVerCursor)# 下elif self.down.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeVerCursor)# 右上elif self.right_up.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeBDiagCursor)# 右elif self.right.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeHorCursor)# 右下elif self.right_down.contains(a0.position().x(), a0.position().y()):self.setCursor(Qt.SizeFDiagCursor)else:self.setCursor(Qt.ArrowCursor)else:self.setCursor(Qt.ArrowCursor)else:self.setCursor(Qt.ArrowCursor)# 如果按下且在左上角范围内则缩放(其他代码参考左上)if self.move_left_up_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeFDiagCursor)resize_w = self.win_w - offset_xresize_h = self.win_h - offset_y# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_w = self.MIN_WINDOW_WIDTH if resize_w < self.MIN_WINDOW_WIDTH else resize_wresize_h = self.MIN_WINDOW_HEIGHT if resize_h < self.MIN_WINDOW_HEIGHT else resize_h# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 设置窗口移动,需要鼠标跟随# x y 都要鼠标跟随if resize_w != self.MIN_WINDOW_WIDTH and resize_h != self.MIN_WINDOW_HEIGHT:self.move(self.win_x + offset_x, self.win_y + offset_y)# 缩放宽度等于最小宽度,高度鼠标跟随if resize_w == self.MIN_WINDOW_WIDTH and resize_h != self.MIN_WINDOW_HEIGHT:self.move(self.x(), self.win_y + offset_y)# 缩放高度等于最小高度,宽度鼠标跟随if resize_w != self.MIN_WINDOW_WIDTH and resize_h == self.MIN_WINDOW_HEIGHT:self.move(self.win_x + offset_x, self.y())# 如果按下且在左边范围内则缩放elif self.move_left_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeHorCursor)resize_w = self.win_w - offset_xresize_h = self.win_h# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_w = self.MIN_WINDOW_WIDTH if resize_w < self.MIN_WINDOW_WIDTH else resize_w# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 设置窗口移动,需要鼠标跟随# 只要宽度鼠标跟随if resize_w != self.MIN_WINDOW_WIDTH:self.move(self.win_x + offset_x, self.win_y)# 如果按下且在左下角范围内则缩放elif self.move_left_down_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeBDiagCursor)resize_w = self.win_w - offset_xresize_h = self.win_h + offset_y# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_w = self.MIN_WINDOW_WIDTH if resize_w < self.MIN_WINDOW_WIDTH else resize_wresize_h = self.MIN_WINDOW_HEIGHT if resize_h < self.MIN_WINDOW_HEIGHT else resize_h# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 设置窗口移动,需要鼠标跟随# x y 都要鼠标跟随if resize_w != self.MIN_WINDOW_WIDTH and resize_h != self.MIN_WINDOW_HEIGHT:self.move(self.win_x + offset_x, self.y())# 缩放高度等于最小高度,宽度鼠标跟随if resize_w != self.MIN_WINDOW_WIDTH and resize_h == self.MIN_WINDOW_HEIGHT:self.move(self.win_x + offset_x, self.y())# 如果按下且在上边范围内则缩放elif self.move_up_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeVerCursor)resize_w = self.win_wresize_h = self.win_h - offset_y# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_h = self.MIN_WINDOW_HEIGHT if resize_h < self.MIN_WINDOW_HEIGHT else resize_h# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 设置窗口移动,需要鼠标跟随# 只要高度鼠标跟随if resize_h != self.MIN_WINDOW_HEIGHT:self.move(self.win_x, self.win_y + offset_y)# 如果按下且在下边范围内则缩放elif self.move_down_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeVerCursor)resize_w = self.win_wresize_h = self.win_h + offset_y# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_h = self.MIN_WINDOW_HEIGHT if resize_h < self.MIN_WINDOW_HEIGHT else resize_h# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 如果按下且在右上角范围内则缩放elif self.move_right_up_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeBDiagCursor)resize_w = self.win_w + offset_xresize_h = self.win_h - offset_y# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_w = self.MIN_WINDOW_WIDTH if resize_w < self.MIN_WINDOW_WIDTH else resize_wresize_h = self.MIN_WINDOW_HEIGHT if resize_h < self.MIN_WINDOW_HEIGHT else resize_h# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 设置窗口移动,需要鼠标跟随# x y 都要鼠标跟随if resize_w != self.MIN_WINDOW_WIDTH and resize_h != self.MIN_WINDOW_HEIGHT:self.move(self.win_x, self.win_y + offset_y)# 缩放宽度等于最小宽度,高度鼠标跟随if resize_w == self.MIN_WINDOW_WIDTH and resize_h != self.MIN_WINDOW_HEIGHT:self.move(self.x(), self.win_y + offset_y)# 如果按下且在右边范围内则缩放elif self.move_right_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeHorCursor)resize_w = self.win_w + offset_xresize_h = self.win_h# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_w = self.MIN_WINDOW_WIDTH if resize_w < self.MIN_WINDOW_WIDTH else resize_w# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 如果按下且在右下角范围内则缩放elif self.move_right_down_flag:# 拖动的时候也要设置一下形状self.setCursor(Qt.SizeFDiagCursor)resize_w = self.win_w + offset_xresize_h = self.win_h + offset_y# 如果缩放后的尺寸小于最小尺寸则窗口不能缩放了resize_w = self.MIN_WINDOW_WIDTH if resize_w < self.MIN_WINDOW_WIDTH else resize_wresize_h = self.MIN_WINDOW_HEIGHT if resize_h < self.MIN_WINDOW_HEIGHT else resize_h# 设置窗口缩放尺寸self.resize(resize_w, resize_h)# 如果按下才能移动elif self.drag_flag:# 设置窗口移动的距离self.move(self.win_x + offset_x, self.win_y + offset_y)return super().mouseMoveEvent(a0)def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None:self.m_flag = Falseself.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))"""@description 鼠标按下松开事件@param@return"""self.drag_flag = Falseself.move_left_up_flag = Falseself.move_left_flag = Falseself.move_left_down_flag = Falseself.move_up_flag = Falseself.move_down_flag = Falseself.move_right_up_flag = Falseself.move_right_flag = Falseself.move_right_down_flag = Falseself.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))return super().mouseReleaseEvent(a0)

②使用

class TestWidget(QWindowMoveResizeWidget):def __init__(self, parent=None):super(TestWidget, self).__init__(parent)self.resize(400, 300)# 绘制事件def paintEvent(self, event: PySide6.QtGui.QPaintEvent) -> None:painter = QPainter(self)# 设置无边缘painter.setPen(Qt.NoPen)# 设置抗锯齿,不然边框会有明显锯齿painter.setRenderHint(QPainter.RenderHint.Antialiasing)# 设置窗体颜色painter.setBrush(QColor(50, 150, 250))# 设置绘制区域painter.drawRoundedRect(self.rect(), 50, 50)super().paintEvent(event)if __name__ == '__main__':app = QApplication([])main = TestWidget()main.show()app.exec()

相关内容

热门资讯

AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
AWR报告解读 WORKLOAD REPOSITORY PDB report (PDB snapshots) AW...
AWS管理控制台菜单和权限 要在AWS管理控制台中创建菜单和权限,您可以使用AWS Identity and Access Ma...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...
Azure构建流程(Power... 这可能是由于配置错误导致的问题。请检查构建流程任务中的“发布构建制品”步骤,确保正确配置了“Arti...
群晖外网访问终极解决方法:IP... 写在前面的话 受够了群晖的quickconnet的小水管了,急需一个新的解决方法&#x...
AWSECS:哪种网络模式具有... 使用AWS ECS中的awsvpc网络模式来获得最佳性能。awsvpc网络模式允许ECS任务直接在V...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...