Skip to main content

Posts

How To Install Qt5.* AND QtCreator On UBUNTU 16.04

This tutorial was done with the following software versions: Ubuntu 16.04 LTS Qt Creator 3.5.1 Qt 5.5.1 Install Qt sudo apt-get install build-essential sudo apt-get install qt5-default   sudo apt-get install qtcreator Install documentation and examples If Qt Creator is installed thanks to the Ubuntu Software Center or thanks to the synaptic package manager, documentation for Qt Creator is not installed. Hitting the F1 key will show you the following message : "No documentation available". This can easily be solved by installing the Qt documentation: sudo apt-get install qt5-doc And eventually: sudo apt-get install qt5-doc-html qtbase5-doc-html If you the examples are also missing: sudo apt-get install qtbase5-examples Restart Qt Creator to make the documentation available.
Recent posts

Tutorial 1 - How to Use uuid in Django

uuid is used when you need unique values from a model e.q (twitter with their status id) in the models.py id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) #if you dont want to use the uuid as the model id   use #unique_id = models.UUIDField(default=uuid.uuid4, editable = False,unique=True) in urls.py from django.conf.urls import url from . import views urlpatterns = [     url(r'^status/$', views.status, name='status'), ] and from views.py from django.shortcuts import render def status(request, uuid):     status = get_object_or_404(id=uuid)     return render(request, 'core/status.html', {'status': status})

Python Snippet 01 - Requirements.txt

Recently i needed to get the requirements of my Django project so i could move it to a production server.  So i researched the web and found REQUIREMENTS.TXT Why requirements.txt? Any application typically has a set of dependencies that are required for that application to work. The requirements file is a way to specify and install specific set of package dependencies at once. Format for requirements file:  Django ==0.10.1 djangorestframework ==1.2.0 Method 1: $ pip freeze > requirements.txt Use pip’s freeze command to generate a requirements.txt file for your project: If you save this in requirements.txt, then you can $ pip install -r requirements.txt to install all the requirements of your project. NB: Use the pip freeze command in your virtualenv or else yuou will list all your dependencies

How To Make A Django Follower System

In a recent project i worked on, i needed a way to implement a follower system, after searching the net and not getting any concrete information on making a follower system. i decided to write my own after i finish making the system on my own. So lets move forward, i assume that you already have a django project started and you are using a custom profile class open the models.py file of the login/authentication app and paste the below class Followers(models.Model): follower = models.ForeignKey(settings.AUTH_USER_MODEL,related_name='follower')  following = models.ForeignKey(settings.AUTH_USER_MODEL,related_name='following') def __str__(self):         return '{} followers {}'.format(self.follower, self.following) in the userprofile class append these functions to the end of the models     def get_followers(self):         get_follower = Followers.objects.filter(follower__pk=self.user.pk) ...

QT Projects and Libraries for The C++ Programmer

Here i will gather the best and most interesting Qt/C++  projects and libraries  for your perusal https://github.com/biluna/biluna    Biluna is a Qt application framework. It started with the idea to make an Eclipse like (Java) framework. The framework allows the developer to start with a ready to use desktop application. The additional functionality is added by using plug-ins. The basic framework provides a MDI (multiple document interface) window work area with docking windows at the different sides of the working area.   https://github.com/openhomm/openhomm                                                        OpenHoMM is open source clone of 'Heroes Of Might And Magic III Shadow Of Death' game engine. Requirments: original game data Qt >= 5.5.1   https://github.com/shadowsocks/libQtShadow...