How to open a new page in a window #1343
xiaozhiagi
started this conversation in
Ideas / Feature Requests
Replies: 3 comments 4 replies
-
If I understand correctly, you would like to open the link in a new window instead of a new browser tab. That's currently not possible. Let's convert this discussion into a feature request. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would this only be working in Native mode? |
Beta Was this translation helpful? Give feedback.
3 replies
-
you can use dialog to simulate it. from nicegui import ui
def link_dialog(target):
with ui.dialog() as dialog,ui.card():
with ui.element('q-toolbar'):
with ui.element('q-toolbar-title'):
ui.label('pop window')
ui.button(icon='close',on_click=dialog.close).props('flat round dense')
with ui.element('q-card-section'):
ui.element('iframe').classes('w-96 h-96').props(f'src="{target}"')
return dialog
@ui.page('/')
def page_index():
ui.link("abc",).on('click',lambda e:link_dialog('/abc').open())
@ui.page('/abc')
def page_abc():
ui.label('page abc')
ui.run(native=True) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
How to click on a link in a window with native=True, instead of allowing it to jump through the browser and open it in the window, and support clicking on x to close the jump page。
Beta Was this translation helpful? Give feedback.
All reactions