How to sort tabs and set tab text - pyqt

I'm using the pyside designer as well as coding from the python file. I know I can use setTabText(index, text) to set a tab text but I want to set a tab text for a tab by object name. Also, is there a way to set a tab text when creating the tab? Also, is it possible to put the tabs on the left instead of the top? Like from top to bottom on the left side instead of left to right.

As you do not provide a working code example I will give you a just-explanation answer with no code.
First, set tab by object name: you need to find your object by name using tab = yourTabWidget.findChild(QWidget,"your-object-name") then using yourTabWidget.indexOf(tab) you get the index of your tab an finally use setTabText(index, text) as you already know. Also when you add or insert the tabs you can provide as a second parameter the name as in yourTabWidget.addTab(yourNewTab, "the-title-of-the-tab")
Second, yes, yo can put your tabs to the left using: yourTabWidget.setTabPosition(QtGui.QTabWidget.West)

Related

How can I bulk search and find data with slight differences in different rows?

There is something I want to do; but i don't know if it is possible.
I want to know if I can do what I want to do with EmEditor or something else.
You can find an example of what I want below.
Example Picture:
• The data on the left does not have the full name.
• The data on the right are those with the full name.
I present a small video to express what I want clearly.
Please watch the video first and then see the sample files where you can try how to do what I want.
Sample Video
Sample Files
The file on the right contains much more data than the file on the left.
That's why the first thing that comes to mind is; so sorting is useless.
For example, the data in the 1st row of the data on the left; corresponds to row 2 of the data on the right.
So no one has the same row.
That's why sorting doesn't work; and I need to search the left side data one by one inside the right side data and find the full name.
FOR INSTANCE:
On the left: 10-infographic-solutions-part-1
On the right: 10-infographic-solutions-part-1-D5DADA
Instead of searching all of them one by one, I want to automatically find the left-hand data among the right-hand data.
I thought this might be possible with EmEditor; but I don't know how.
If this is possible I would like to know how.
Also, there is one more thing I want to know.
I have something to add to the end of each line; but I can't put a bulk cursor at the end of all of them.
How can I do this with EmEditor?
I hope I was able to express clearly what I wanted.
If there is anything that confuses you, please let me know.
You can use Advanced Filter to find multiple strings combined with Logical Disjunction (OR). To do this:
Open Missing Data.txt with EmEditor, select all (Ctrl+A), and copy all the text to the Clipboard (Ctrl+C).
Open Full Data.txt, and click the Advanced Filter button on the Filter toolbar.
Click in the list box of the Advanced Filter dialog box, and press Ctrl+V to paste the Clipboard contents to the list box.
While all the items in the list box are selected, make sure the Match Case, (None), and Logical Disjunction (OR) options are selected, but no other options are selected.
Click the Filter button.
You didn't write what you want to do after searches, but if you want to remove all the matched lines from Full Data.txt:
Click the Abort button if you are already filtering. Click Bookmark button, and Close to dismiss the dialog box.
Right-click on the left edge of the editor (or select Edit menu - Bookmarks), and select Delete Bookmarked Lines.
As for selecting the end of each line, you can drag Mouse while pressing Alt to make a zero-width vertical selection at right (or press Alt+E, E to make a vertical selection, and press End). See Multiple Selection Editing for more information.

How to display Jupyterlab output in new tab?

I am trying to get an output tab in Jupyterlab that shows the output of my code. Right now I can right-click on a cell output in the notebook and create an output view -- but this view does not update as I execute additional cells. Is there a way to do this (a setting or extension)?
I envision something like the Python extension in VS Code that allows you to split the screen and run cell code on the left and see the output on the right.
Just right-click the tab which shows the name of the file you are editing.
In the popup window select New View for Notebook.
A new tab (in a new window) will be opened and the output(s) of your file will be shown there.
Here after, if you give additional codes and run them, you will see that the output is updated in the New view.
Particularly, when you have a cell with markdown format, your input in that cell will be rendered (as you type) in the new view as a formatted one!
Right now I can right-click on a cell output in the notebook and create an output view
That's right.
but this view does not update as I execute additional cells.
That's right too. It is THE view of THE output for the cell you selected. If you produce some new output on THAT cell, it will update. Each cell has its own output area.
Is there a way to do this (a setting or extension)?
I'd suggest you explore the "output" widget. I can be very versatile once you learn to use it well (easier said than done).
https://ipywidgets.readthedocs.io/en/stable/examples/Output%20Widget.html
but this view does not update as I execute additional cells. Is there a way to do this (a setting or extension)?
Yes.
https://github.com/xiaohk/stickyland
This extension allows (among other things) to have one/multiple cells to rerun every time you run any cell.
The 2+1 guys there made a brilliant extension that works flawlessly. I can't praise them enough.
I envision something like the Python extension in VS Code that allows you to split the screen and run cell code on the left and see the output on the right.
That is also available.
It is under View > Render side by side
You are mixing up too many things.
See this:
https://github.com/jupyter/notebook/issues/2897

Text Tab - Letter Spacing

I am using Docusign via the PHP SDK on a project I am currently working on. I am using existing PDF forms that I need to insert text into dynamically and I am using the Text Tab to do this. Everything is working fine but on one of the forms I need to have field's letters positioned within pre-defined boxes, which requires me to have letter spacing so that each letter is aligned within a box. Is there any way to change the spacing between letters in a Text Tab so that I can get the alignment right?
The Docusign REST API documentation for Text Tab suggests that you can specify font/fontSize/bold/italic properties to adjust the font. There is no option for letter spacing.

open file in new tab

Does Android Studio have the option of opening a referenced file in a new tab (like Xcode's Alt-click feature)?
If not, is there a way of creating this?
Open current editor tab in new window
Shift+F4
Even I couldn't find a way of "Duplicating Tabs". But there are two workarounds that might help:
1) Right click on a tab title and choose either Split Vertically or Split Horizontally. This can be done multiple times!
2) If for some reason you don't want to see the files side by side, there's another hack (works for me on Mac): First, right click on a tab title and choose either Split Vertically or Split Horizontally. Now, drag the extra tab (by its title) on to the title bar of Android Studio => the tab will pop out into a new window!
Hope this helps!

how to change text dynamically with raphael

Ok, this is basically what I'm doing right now. I create the raphael text object. I use a click event to open a dialog box. Then I make the changes to the text in the dialog box. This isn't how I wish to implement this though. I want my implementation to be somewhat similar to the way text is created in MS Paint where the user can click on the text object and change the text as they're typing. Does anybody know how to implement this using a raphael text object?
A simple solution would be to create a <textarea> when the user starts editing the text. Fill it with the current text and place it over the text object. Then, when it loses focus (onblur), remove the text area and copy the text back into the text object.
If you really want to edit the text "in place" in the text object, then you can let the user type in a hidden text field. But in this case you'll have to implement all the cursor and selection logic yourself. See this fiddle (which only allows using the right and left arrows to move the cursor, with shift to select text so that you can copy and paste).
Alternately, I don't know if contenteditable works for SVG content, but that would be a very simple solution if it did work.

Resources