Qt Screenshot sharing app - How to select the area of a screen - qt

I am trying to code an app in Qt for capturing and then sharing the screenshots. For now my application captures the screenshot, shows a preview and saves it. I am yet to do the upload part. but before that I would like to be able to select the area of the screen of which the screenshot needs to be captured.
I tried searching and I couldn't find any helpful articles or documents in Qt. So can anyone help me?
PS: The idea is to create a similar app like lightshot and several other similar tools.
Thanks in advance

There are two methods that you can use for this: -
1) Capture an image of the screen and then display that, full screen to the user, essentially allowing the user to crop the image.
2) A more commonly used method is to create a full-screen, topmost window that has no title bar and is transparent. This allows the user to drag out an area, which you can draw an outline to represent the area the user requires.
I recommend the 2nd method and creating a transparent window is simply a matter of changing the window flags, as you can see here.

Related

xamarin forms UWP app - how to create a "open file" dialogue that looks / feels similar in concept to MS Word?

I need to create a GUI that works similar to this:
So specifically:
I'd like to have a split screen where first on the left, i show a static list of locations... like local workspace and a sharepoint site.
and then depending on what they select on the left ... the right side of the page updates.
Can I use a grid for this? Or what's the best way? I just need some key words to google or youtube search. thank you!
Use a StackLayout (I think it will fit well to this case) and a Grid.
Inside this Grid, you can set 2 columns.
For columns (the static that you mentioned) you can put OR labels OR a ListView.
As you said: "depending on what they select on the left ... the right side of the page updates." It reminds me a Search Page, or... SearchBar!
This link will help you to create this SearchBar. The only thing that will change is the layout (put SearchBar on the left and the resultList on the right).
With this steps, you can customize and create something like in the photo.
If has any doubt, please, update your question with what you did and we will help you. Have fun.

AutoHotKey to focus a Form in Microsoft Access 2010/2013

I would like to use AutoHotKey to bring an access database to the screen, then take focus on one form (the form is open, but there will always be multiple other forms open at the same time, additionally, the form in question could be stacked at the bottom) and then the rest can be done with custom shortcuts that only work in this form.
I am also open for other solutions to do the same job, mouse clicks is also a possibility but forms are not always in the same place on different computers and they can also be moved during a session.
This is what I have been testing so far:
Bring up the database with IfWinExist, [title of window]
Then I tried using ControlFocus, [ControllerName]
That did work, but the controllername changes depending on what other forms are open and in which order they where last clicked on.
I have made a screenshot:
Any help would be nice, my main problem is that I do not know what AHK can do and therefore I feel very limited.
In the place of WinTitle you can also use other parameters of the window, not only WinTitle. More about it here: http://ahkscript.org/docs/misc/WinTitle.htm
Also you can use ImageSearch to get coordinates of the window and use these coordinates to move window without WinMove like here: http://ahkscript.org/boards/viewtopic.php?f=6&t=4013

How to get info from a window and the modify it using AutoIT?

I am trying to automate the process of turning display layers on and off in a modeling program using AutoIt. I am currently using code that simply simulates a mouse-click at a particular pixel position and as that of course needs to be set up differently depending on the screen being used at the time, I would like to replace the mouse-click simulation with getting the information from the window, looking for a certain text, then checking or unchecking the "Map" and "Legend" check boxes.
My problem is that I don't know how to do that. If someone has a good way to include or point to screen shots let me know but until then I will try to describe everything the best that I can.
The window:
The window I am referring to is titled "Map Layers". The area that I am specifically interested is looks like a large list box (it takes up the vast majority of the window space) and it has 4 columns: Layer Name, Map, Legend, and Sample. Name has the name of the layer, Map has a check box to control which layers are displayed, Legend has a check box that controls which layers appear in the legend window, and Sample for some layers has the symbol that will appear in the legend. for my purpose the Sample column is irrelevant.
AutoIt v3 Window Info:
When I use the finder tool I can't get it to highlight the "list box" area, only the surrounding boarder that it and some buttons are in. The window info says that this surrounding boarder area (which seems similar to a panel) has a class of Button.
So my fundamental question is what code to use to drill into that "Button", find out what the list view looking thing is, and get the info from it, then interact with the map and legend check boxes without referring to pixel location (or at least grammatically get the pixel position).
If I have left out any important information or was unclear anywhere please let me know.
Edit: Forgot to mention and don't know if it helps but the info given using the finder tool for the column headers is Control: Class: SysHeader32
Try RanorexSpy and see if it can give you more details.

How accessible is Fullcalendar?

I'm having problems making FullCalendar fully accessible. I'm using the default month view and can't access the next, previous, and today buttons on the top right without using a mouse. If I run a screen reader, I can access those buttons but not without running the screen reader.
And on another note, I currently am using tool tips that pop up when you mouse over an event title to display more information. If anyone has any tips on how to make those accessible to a screen reader or accessible without a mouse, I'd greatly appreciate it!
Regarding the buttons, I would advice that you write new buttons if accessibility is important. These buttons you could then hook up to your own javascript functions that moves to previous and next.
Check out this documentation example
Regarding the second problem, I think that's the same problem not just for physically impaired but also for things like mobile browsers. My tip would be to avoid onmouseover if the information that appears is really important.

Qt switching between views

How do I switch between the two screens on the Qt?
For example, I have a button - static text plus a toolbar. Now I will add it to a frame and set it as a central widget. It works well for one window. What if I move it to the next window? Then I need to show some other stuff like another button, some images etc... and what if I come back to the first view again?
How do I show my old widgets back?
I'm not sure I got your problem right but, you could have different scenarios :
You could simply use groupboxes... Some widgets in groupbox1, otherWidget in groupbox2, and you display the groupbox you want to use, hiding the others...
You could use stackedWidget, which simulates "pages" of widgets stacked on top of eachothers... more informations here : http://qt.nokia.com/doc/4.6/qstackedwidget.html.
You could use other way like using tabs : http://doc.trolltech.com/4.6/qtabwidget.html
Maybe this example would be useful to you : http://qt.nokia.com/doc/4.6/dialogs-configdialog.html
Hope it helps a bit !
I'd recommend checking out Animation/States example (should be in /qt/examples/animation/states/ subdirectory of your Qt installation). It shows how to combine state machine representing application logic with presentation layer and get cool animation effects for free (of course if you don't need eye candy, you can set widgets properties without any animation).

Resources