AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Qview image viewer12/25/2023 ![]() arg( QDir ::toNativeSeparators(fileName), reader. QMessageBox ::information( this, QGuiApplication ::applicationDisplayName() , The function loadFile() is used to load the image.īool ImageViewer ::loadFile( const QString &fileName) We show the file dialog until a valid file name is entered or the user cancels. ![]() We compile a list of mime types for use as a filter by querying QImageReader for the available mime type names. In the open() slot, we show a file dialog to the user. exec() = QDialog ::Accepted & & !loadFile(dialog. InitializeImageFileDialog(dialog, QFileDialog ::AcceptOpen) QFileDialog dialog( this, tr( "Open File")) If (acceptMode = QFileDialog ::AcceptSave) setMimeTypeFilters(mimeTypeFilters) ĭialog. ? QImageReader ::supportedMimeTypes() : QImageWriter ::supportedMimeTypes() įor ( const QByteArray &mimeTypeName : supportedMimeTypes)ĭialog. last()) Ĭonst QByteArrayList supportedMimeTypes = acceptMode = QFileDialog ::AcceptOpen isEmpty() ? QDir ::currentPath() : picturesLocations. Static void initializeImageFileDialog( QFileDialog &dialog, QFileDialog ::AcceptMode acceptMode)Ĭonst QStringList picturesLocations = QStandardPaths ::standardLocations( QStandardPaths ::PicturesLocation) ĭialog. At the end we create the associated actions and menus, and customize the ImageViewer's appearance. We make imageLabel the scroll area's child widget, and we make scrollArea the central widget of the QMainWindow. ![]() If we omitted to set the imageLabel's scaledContents property, zooming in would enlarge the QLabel, but leave the pixmap at its original size, exposing the QLabel's background. We ensure that the label will scale its contents to fill all available space, to enable the image to scale properly when zooming. Otherwise, the default size polizy ( preferred) will make scroll bars appear when the scroll area becomes smaller than the label's minimum size hint. We set imageLabel's size policy to ignored, making the users able to scale the image to whatever size they want when the Fit to Window option is turned on. In the constructor we first create the label and the scroll area. Resize( QGuiApplication ::primaryScreen() - >availableSize() * 3 / 5) ScrollArea - >setBackgroundRole( QPalette ::Dark) ImageLabel - >setSizePolicy( QSizePolicy ::Ignored, QSizePolicy ::Ignored) ![]() ImageLabel - >setBackgroundRole( QPalette ::Base) : QMainWindow(parent), imageLabel( new QLabel) ImageViewer ::ImageViewer( QWidget *parent) In turn, scaleImage() uses adjustScrollBar() to preserve the focal point after scaling an image. The zoom slots use scaleImage() to perform the zooming. We use the updateActions() function to update the menu entries when a new image is loaded, or when the Fit to Window option is toggled. We use createActions() and createMenus() when constructing the ImageViewer widget. In addition we create four private functions. We reimplement the constructor, and create several private slots to facilitate the menu entries. The ImageViewer class inherits from QMainWindow. #if defined(QT_PRINTSUPPORT_LIB) & QT_CONFIG(printer) QPrinter printer We are DMCA-compliant and gladly to cooperation with you.Void adjustScrollBar( QScrollBar *scrollBar, double factor) We are not directly affiliated with them.Īll trademarks, registered trademarks, item names and business names or logos that mentioned in right here are the assets of their respective owners. qView is a windows app that developed by jurplel. Whenever you click the “ Download” hyperlink on this page, files will downloading directly in the owner sources (Official sites/Mirror Site). This qView App installation file is completely not hosted on our Server. XnView is provided as FREEWARE for private non-commercial or educational use (including non-profit… XnView is a utility for viewing and converting graphic files. Link: FastStone Image Viewer Alternative and Reviews XnView Windows compatible image browsing, conversion, and editing software with robust format support. Link: digiKam Alternative and Reviews FastStone Image Viewer Professional digital photo management software to organize, tag, compare and process photo collections. Link: XnView MP Alternative and Reviews digiKam Link: IrfanView Alternative and Reviews XnView MPĬomprehensive photo management software for viewing, batch converting, editing and resizing images and creating thumbnail sheets. QView Alternatives and Similar Software IrfanViewįast, compact image viewer, editor, converter and organizer designed to be simple but powerful.
0 Comments
Read More
Leave a Reply. |